Criar Token
curl --request POST \
--url https://production.api.noodle.cx/external/test/generate-token \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-private-key: <x-private-key>' \
--header 'x-user-id: <x-user-id>' \
--data '
{
"method": "GET",
"path": "/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565",
"body": {
"key": "value"
}
}
'import requests
url = "https://production.api.noodle.cx/external/test/generate-token"
payload = {
"method": "GET",
"path": "/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565",
"body": { "key": "value" }
}
headers = {
"x-user-id": "<x-user-id>",
"x-api-key": "<x-api-key>",
"x-private-key": "<x-private-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-user-id': '<x-user-id>',
'x-api-key': '<x-api-key>',
'x-private-key': '<x-private-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
method: 'GET',
path: '/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565',
body: JSON.stringify({key: 'value'})
})
};
fetch('https://production.api.noodle.cx/external/test/generate-token', 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://production.api.noodle.cx/external/test/generate-token",
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([
'method' => 'GET',
'path' => '/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565',
'body' => [
'key' => 'value'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-private-key: <x-private-key>",
"x-user-id: <x-user-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://production.api.noodle.cx/external/test/generate-token"
payload := strings.NewReader("{\n \"method\": \"GET\",\n \"path\": \"/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565\",\n \"body\": {\n \"key\": \"value\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-user-id", "<x-user-id>")
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-private-key", "<x-private-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.api.noodle.cx/external/test/generate-token")
.header("x-user-id", "<x-user-id>")
.header("x-api-key", "<x-api-key>")
.header("x-private-key", "<x-private-key>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"GET\",\n \"path\": \"/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565\",\n \"body\": {\n \"key\": \"value\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.api.noodle.cx/external/test/generate-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-user-id"] = '<x-user-id>'
request["x-api-key"] = '<x-api-key>'
request["x-private-key"] = '<x-private-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"GET\",\n \"path\": \"/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565\",\n \"body\": {\n \"key\": \"value\"\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Autenticacao
Criar Token
Use este endpoint para gerar um token JWT de teste para testes direto em nossa documentação.
POST
/
test
/
generate-token
Criar Token
curl --request POST \
--url https://production.api.noodle.cx/external/test/generate-token \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-private-key: <x-private-key>' \
--header 'x-user-id: <x-user-id>' \
--data '
{
"method": "GET",
"path": "/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565",
"body": {
"key": "value"
}
}
'import requests
url = "https://production.api.noodle.cx/external/test/generate-token"
payload = {
"method": "GET",
"path": "/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565",
"body": { "key": "value" }
}
headers = {
"x-user-id": "<x-user-id>",
"x-api-key": "<x-api-key>",
"x-private-key": "<x-private-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-user-id': '<x-user-id>',
'x-api-key': '<x-api-key>',
'x-private-key': '<x-private-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
method: 'GET',
path: '/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565',
body: JSON.stringify({key: 'value'})
})
};
fetch('https://production.api.noodle.cx/external/test/generate-token', 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://production.api.noodle.cx/external/test/generate-token",
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([
'method' => 'GET',
'path' => '/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565',
'body' => [
'key' => 'value'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-private-key: <x-private-key>",
"x-user-id: <x-user-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://production.api.noodle.cx/external/test/generate-token"
payload := strings.NewReader("{\n \"method\": \"GET\",\n \"path\": \"/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565\",\n \"body\": {\n \"key\": \"value\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-user-id", "<x-user-id>")
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-private-key", "<x-private-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.api.noodle.cx/external/test/generate-token")
.header("x-user-id", "<x-user-id>")
.header("x-api-key", "<x-api-key>")
.header("x-private-key", "<x-private-key>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"GET\",\n \"path\": \"/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565\",\n \"body\": {\n \"key\": \"value\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.api.noodle.cx/external/test/generate-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-user-id"] = '<x-user-id>'
request["x-api-key"] = '<x-api-key>'
request["x-private-key"] = '<x-private-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"GET\",\n \"path\": \"/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565\",\n \"body\": {\n \"key\": \"value\"\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
Seu User ID
Sua API Key
Sua chave privada (PEM) para assinatura da requisição em base64
Body
application/json
O método HTTP da requisição final (ex: 'GET', 'POST').
Example:
"GET"
O caminho do endpoint final (ex: '/external/receipts/some-id').
Example:
"/external/receipts/00d51abb-7bf5-42ee-a9e7-fc7398236565"
O corpo JSON da requisição final, se houver.
Example:
{ "key": "value" }
Response
Successful Response