Skip to main content
POST
/
loon
/
inquiries
/
jobs
cURL
curl --request POST \
  --url https://services.sandbox.pagosapi.com/loon/inquiries/jobs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: text/plain' \
  --header 'x-merchant-id: <x-merchant-id>' \
  --data '
{
  "content": "<string>"
}
'
import requests

url = "https://services.sandbox.pagosapi.com/loon/inquiries/jobs"

payload = { "content": "<string>" }
headers = {
    "x-merchant-id": "<x-merchant-id>",
    "Authorization": "Bearer <token>",
    "Content-Type": "text/plain"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {
    'x-merchant-id': '<x-merchant-id>',
    Authorization: 'Bearer <token>',
    'Content-Type': 'text/plain'
  },
  body: JSON.stringify({content: '<string>'})
};

fetch('https://services.sandbox.pagosapi.com/loon/inquiries/jobs', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://services.sandbox.pagosapi.com/loon/inquiries/jobs",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'content' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: text/plain",
    "x-merchant-id: <x-merchant-id>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://services.sandbox.pagosapi.com/loon/inquiries/jobs"

	payload := strings.NewReader("{\n  \"content\": \"<string>\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-merchant-id", "<x-merchant-id>")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "text/plain")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://services.sandbox.pagosapi.com/loon/inquiries/jobs")
  .header("x-merchant-id", "<x-merchant-id>")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "text/plain")
  .body("{\n  \"content\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://services.sandbox.pagosapi.com/loon/inquiries/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-merchant-id"] = '<x-merchant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'text/plain'
request.body = "{\n  \"content\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "jobId": 123
}
{
  "error": {
    "code": "<string>",
    "message": "<string>",
    "details": {}
  }
}

Authorizations

Authorization
string
header
required

Format is: Bearer <api_key>, where <api_key> is your Pagos API key

Headers

x-merchant-id
string
required

Merchant identifier for requests.

Body

content
string

Response

Success

jobId
integer<int64>