Enviar venda
curl --request POST \
--url https://public-api.repediu.com.br/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"items": [
{
"id": "<string>",
"index": 123,
"name": "<string>",
"quantity": 123,
"unitPrice": {
"value": 123,
"currency": "BRL"
},
"totalPrice": {
"value": 123,
"currency": "BRL"
},
"category": "<string>",
"externalCode": "<string>",
"unit": "UN",
"ean": "<string>",
"specialInstructions": "<string>",
"originalPrice": {
"value": 123,
"currency": "BRL"
},
"optionsPrice": {
"number": 123,
"currency": "<string>"
},
"options": [
{
"id": "<string>",
"name": "<string>",
"externalCode": "<string>",
"unit": "<string>",
"quantity": 123,
"unitPrice": {
"value": 123,
"currency": "BRL"
},
"totalprice": {
"value": 123,
"currency": "BRL"
},
"type": "<string>",
"category": "<string>"
}
],
"pizza": {
"crust": "<string>",
"edge": "<string>"
}
}
],
"customer": {
"id": "<string>",
"name": "<string>",
"documentNumber": "<string>",
"phone": {
"number": "<string>",
"extension": "+55"
},
"email": "<string>",
"birthDate": "2023-12-25",
"loyaltyPoints": 123,
"gender": 123,
"ordersCountOnMerchant": 123
},
"type": "<string>",
"displayId": "<string>",
"sourceAppId": "<string>",
"salesChannel": "<string>",
"storeChannel": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"lastEvent": "<string>",
"preparationStartDateTime": "2023-11-07T05:31:56Z",
"discounts": [
{
"amount": {
"value": 123,
"currency": "BRL"
},
"target": "<string>",
"targetId": "<string>",
"sponsorshipValue": [
{
"name": {
"value": "<string>"
},
"value": {
"amount": 123
},
"description": {
"value": "<string>"
}
}
]
}
],
"total": {
"itemsPrice": {
"value": 123,
"currency": "BRL"
},
"otherFees": {
"value": 123,
"currency": "BRL"
},
"discount": {
"value": 123,
"currency": "BRL"
},
"orderAmount": {
"value": 123,
"currency": "BRL"
}
},
"delivery": {
"deliveredBy": "MERCHANT",
"deliveryAddress": {
"country": "<string>",
"state": "<string>",
"city": "<string>",
"district": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"reference": "<string>",
"formattedAddress": "<string>",
"postalCode": "<string>",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"estimateDateTime": "2023-11-07T05:31:56Z"
},
"otherFees": [
{
"name": "<string>",
"type": "<string>",
"price": {
"value": 123,
"currency": "BRL"
}
}
],
"merchant": {
"id": "<string>",
"name": "<string>"
}
}
]
'import requests
url = "https://public-api.repediu.com.br/orders"
payload = [
{
"id": "<string>",
"items": [
{
"id": "<string>",
"index": 123,
"name": "<string>",
"quantity": 123,
"unitPrice": {
"value": 123,
"currency": "BRL"
},
"totalPrice": {
"value": 123,
"currency": "BRL"
},
"category": "<string>",
"externalCode": "<string>",
"unit": "UN",
"ean": "<string>",
"specialInstructions": "<string>",
"originalPrice": {
"value": 123,
"currency": "BRL"
},
"optionsPrice": {
"number": 123,
"currency": "<string>"
},
"options": [
{
"id": "<string>",
"name": "<string>",
"externalCode": "<string>",
"unit": "<string>",
"quantity": 123,
"unitPrice": {
"value": 123,
"currency": "BRL"
},
"totalprice": {
"value": 123,
"currency": "BRL"
},
"type": "<string>",
"category": "<string>"
}
],
"pizza": {
"crust": "<string>",
"edge": "<string>"
}
}
],
"customer": {
"id": "<string>",
"name": "<string>",
"documentNumber": "<string>",
"phone": {
"number": "<string>",
"extension": "+55"
},
"email": "<string>",
"birthDate": "2023-12-25",
"loyaltyPoints": 123,
"gender": 123,
"ordersCountOnMerchant": 123
},
"type": "<string>",
"displayId": "<string>",
"sourceAppId": "<string>",
"salesChannel": "<string>",
"storeChannel": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"lastEvent": "<string>",
"preparationStartDateTime": "2023-11-07T05:31:56Z",
"discounts": [
{
"amount": {
"value": 123,
"currency": "BRL"
},
"target": "<string>",
"targetId": "<string>",
"sponsorshipValue": [
{
"name": { "value": "<string>" },
"value": { "amount": 123 },
"description": { "value": "<string>" }
}
]
}
],
"total": {
"itemsPrice": {
"value": 123,
"currency": "BRL"
},
"otherFees": {
"value": 123,
"currency": "BRL"
},
"discount": {
"value": 123,
"currency": "BRL"
},
"orderAmount": {
"value": 123,
"currency": "BRL"
}
},
"delivery": {
"deliveredBy": "MERCHANT",
"deliveryAddress": {
"country": "<string>",
"state": "<string>",
"city": "<string>",
"district": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"reference": "<string>",
"formattedAddress": "<string>",
"postalCode": "<string>",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"estimateDateTime": "2023-11-07T05:31:56Z"
},
"otherFees": [
{
"name": "<string>",
"type": "<string>",
"price": {
"value": 123,
"currency": "BRL"
}
}
],
"merchant": {
"id": "<string>",
"name": "<string>"
}
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '<string>',
items: [
{
id: '<string>',
index: 123,
name: '<string>',
quantity: 123,
unitPrice: {value: 123, currency: 'BRL'},
totalPrice: {value: 123, currency: 'BRL'},
category: '<string>',
externalCode: '<string>',
unit: 'UN',
ean: '<string>',
specialInstructions: '<string>',
originalPrice: {value: 123, currency: 'BRL'},
optionsPrice: {number: 123, currency: '<string>'},
options: [
{
id: '<string>',
name: '<string>',
externalCode: '<string>',
unit: '<string>',
quantity: 123,
unitPrice: {value: 123, currency: 'BRL'},
totalprice: {value: 123, currency: 'BRL'},
type: '<string>',
category: '<string>'
}
],
pizza: {crust: '<string>', edge: '<string>'}
}
],
customer: {
id: '<string>',
name: '<string>',
documentNumber: '<string>',
phone: {number: '<string>', extension: '+55'},
email: '<string>',
birthDate: '2023-12-25',
loyaltyPoints: 123,
gender: 123,
ordersCountOnMerchant: 123
},
type: '<string>',
displayId: '<string>',
sourceAppId: '<string>',
salesChannel: '<string>',
storeChannel: '<string>',
createdAt: '2023-11-07T05:31:56Z',
lastEvent: '<string>',
preparationStartDateTime: '2023-11-07T05:31:56Z',
discounts: [
{
amount: {value: 123, currency: 'BRL'},
target: '<string>',
targetId: '<string>',
sponsorshipValue: [
{
name: {value: '<string>'},
value: {amount: 123},
description: {value: '<string>'}
}
]
}
],
total: {
itemsPrice: {value: 123, currency: 'BRL'},
otherFees: {value: 123, currency: 'BRL'},
discount: {value: 123, currency: 'BRL'},
orderAmount: {value: 123, currency: 'BRL'}
},
delivery: {
deliveredBy: 'MERCHANT',
deliveryAddress: {
country: '<string>',
state: '<string>',
city: '<string>',
district: '<string>',
street: '<string>',
number: '<string>',
complement: '<string>',
reference: '<string>',
formattedAddress: '<string>',
postalCode: '<string>',
coordinates: {latitude: 123, longitude: 123}
},
estimateDateTime: '2023-11-07T05:31:56Z'
},
otherFees: [{name: '<string>', type: '<string>', price: {value: 123, currency: 'BRL'}}],
merchant: {id: '<string>', name: '<string>'}
}
])
};
fetch('https://public-api.repediu.com.br/orders', 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://public-api.repediu.com.br/orders",
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([
[
'id' => '<string>',
'items' => [
[
'id' => '<string>',
'index' => 123,
'name' => '<string>',
'quantity' => 123,
'unitPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'totalPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'category' => '<string>',
'externalCode' => '<string>',
'unit' => 'UN',
'ean' => '<string>',
'specialInstructions' => '<string>',
'originalPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'optionsPrice' => [
'number' => 123,
'currency' => '<string>'
],
'options' => [
[
'id' => '<string>',
'name' => '<string>',
'externalCode' => '<string>',
'unit' => '<string>',
'quantity' => 123,
'unitPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'totalprice' => [
'value' => 123,
'currency' => 'BRL'
],
'type' => '<string>',
'category' => '<string>'
]
],
'pizza' => [
'crust' => '<string>',
'edge' => '<string>'
]
]
],
'customer' => [
'id' => '<string>',
'name' => '<string>',
'documentNumber' => '<string>',
'phone' => [
'number' => '<string>',
'extension' => '+55'
],
'email' => '<string>',
'birthDate' => '2023-12-25',
'loyaltyPoints' => 123,
'gender' => 123,
'ordersCountOnMerchant' => 123
],
'type' => '<string>',
'displayId' => '<string>',
'sourceAppId' => '<string>',
'salesChannel' => '<string>',
'storeChannel' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'lastEvent' => '<string>',
'preparationStartDateTime' => '2023-11-07T05:31:56Z',
'discounts' => [
[
'amount' => [
'value' => 123,
'currency' => 'BRL'
],
'target' => '<string>',
'targetId' => '<string>',
'sponsorshipValue' => [
[
'name' => [
'value' => '<string>'
],
'value' => [
'amount' => 123
],
'description' => [
'value' => '<string>'
]
]
]
]
],
'total' => [
'itemsPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'otherFees' => [
'value' => 123,
'currency' => 'BRL'
],
'discount' => [
'value' => 123,
'currency' => 'BRL'
],
'orderAmount' => [
'value' => 123,
'currency' => 'BRL'
]
],
'delivery' => [
'deliveredBy' => 'MERCHANT',
'deliveryAddress' => [
'country' => '<string>',
'state' => '<string>',
'city' => '<string>',
'district' => '<string>',
'street' => '<string>',
'number' => '<string>',
'complement' => '<string>',
'reference' => '<string>',
'formattedAddress' => '<string>',
'postalCode' => '<string>',
'coordinates' => [
'latitude' => 123,
'longitude' => 123
]
],
'estimateDateTime' => '2023-11-07T05:31:56Z'
],
'otherFees' => [
[
'name' => '<string>',
'type' => '<string>',
'price' => [
'value' => 123,
'currency' => 'BRL'
]
]
],
'merchant' => [
'id' => '<string>',
'name' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://public-api.repediu.com.br/orders"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"index\": 123,\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"category\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"UN\",\n \"ean\": \"<string>\",\n \"specialInstructions\": \"<string>\",\n \"originalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"optionsPrice\": {\n \"number\": 123,\n \"currency\": \"<string>\"\n },\n \"options\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalprice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"type\": \"<string>\",\n \"category\": \"<string>\"\n }\n ],\n \"pizza\": {\n \"crust\": \"<string>\",\n \"edge\": \"<string>\"\n }\n }\n ],\n \"customer\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"phone\": {\n \"number\": \"<string>\",\n \"extension\": \"+55\"\n },\n \"email\": \"<string>\",\n \"birthDate\": \"2023-12-25\",\n \"loyaltyPoints\": 123,\n \"gender\": 123,\n \"ordersCountOnMerchant\": 123\n },\n \"type\": \"<string>\",\n \"displayId\": \"<string>\",\n \"sourceAppId\": \"<string>\",\n \"salesChannel\": \"<string>\",\n \"storeChannel\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"lastEvent\": \"<string>\",\n \"preparationStartDateTime\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"amount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"target\": \"<string>\",\n \"targetId\": \"<string>\",\n \"sponsorshipValue\": [\n {\n \"name\": {\n \"value\": \"<string>\"\n },\n \"value\": {\n \"amount\": 123\n },\n \"description\": {\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"total\": {\n \"itemsPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"otherFees\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"discount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"orderAmount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n },\n \"delivery\": {\n \"deliveredBy\": \"MERCHANT\",\n \"deliveryAddress\": {\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"reference\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"estimateDateTime\": \"2023-11-07T05:31:56Z\"\n },\n \"otherFees\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n }\n ],\n \"merchant\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://public-api.repediu.com.br/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"index\": 123,\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"category\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"UN\",\n \"ean\": \"<string>\",\n \"specialInstructions\": \"<string>\",\n \"originalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"optionsPrice\": {\n \"number\": 123,\n \"currency\": \"<string>\"\n },\n \"options\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalprice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"type\": \"<string>\",\n \"category\": \"<string>\"\n }\n ],\n \"pizza\": {\n \"crust\": \"<string>\",\n \"edge\": \"<string>\"\n }\n }\n ],\n \"customer\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"phone\": {\n \"number\": \"<string>\",\n \"extension\": \"+55\"\n },\n \"email\": \"<string>\",\n \"birthDate\": \"2023-12-25\",\n \"loyaltyPoints\": 123,\n \"gender\": 123,\n \"ordersCountOnMerchant\": 123\n },\n \"type\": \"<string>\",\n \"displayId\": \"<string>\",\n \"sourceAppId\": \"<string>\",\n \"salesChannel\": \"<string>\",\n \"storeChannel\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"lastEvent\": \"<string>\",\n \"preparationStartDateTime\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"amount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"target\": \"<string>\",\n \"targetId\": \"<string>\",\n \"sponsorshipValue\": [\n {\n \"name\": {\n \"value\": \"<string>\"\n },\n \"value\": {\n \"amount\": 123\n },\n \"description\": {\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"total\": {\n \"itemsPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"otherFees\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"discount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"orderAmount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n },\n \"delivery\": {\n \"deliveredBy\": \"MERCHANT\",\n \"deliveryAddress\": {\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"reference\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"estimateDateTime\": \"2023-11-07T05:31:56Z\"\n },\n \"otherFees\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n }\n ],\n \"merchant\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.repediu.com.br/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"index\": 123,\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"category\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"UN\",\n \"ean\": \"<string>\",\n \"specialInstructions\": \"<string>\",\n \"originalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"optionsPrice\": {\n \"number\": 123,\n \"currency\": \"<string>\"\n },\n \"options\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalprice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"type\": \"<string>\",\n \"category\": \"<string>\"\n }\n ],\n \"pizza\": {\n \"crust\": \"<string>\",\n \"edge\": \"<string>\"\n }\n }\n ],\n \"customer\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"phone\": {\n \"number\": \"<string>\",\n \"extension\": \"+55\"\n },\n \"email\": \"<string>\",\n \"birthDate\": \"2023-12-25\",\n \"loyaltyPoints\": 123,\n \"gender\": 123,\n \"ordersCountOnMerchant\": 123\n },\n \"type\": \"<string>\",\n \"displayId\": \"<string>\",\n \"sourceAppId\": \"<string>\",\n \"salesChannel\": \"<string>\",\n \"storeChannel\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"lastEvent\": \"<string>\",\n \"preparationStartDateTime\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"amount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"target\": \"<string>\",\n \"targetId\": \"<string>\",\n \"sponsorshipValue\": [\n {\n \"name\": {\n \"value\": \"<string>\"\n },\n \"value\": {\n \"amount\": 123\n },\n \"description\": {\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"total\": {\n \"itemsPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"otherFees\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"discount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"orderAmount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n },\n \"delivery\": {\n \"deliveredBy\": \"MERCHANT\",\n \"deliveryAddress\": {\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"reference\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"estimateDateTime\": \"2023-11-07T05:31:56Z\"\n },\n \"otherFees\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n }\n ],\n \"merchant\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n }\n]"
response = http.request(request)
puts response.read_body{
"result": "Sales queued successfully",
"error": null,
"timeGenerated": "2025-09-26T14:38:34.0739726Z",
"success": true
}
Enviar venda
Envie até 500 vendas por requisição, no formato Open Delivery
POST
/
orders
Enviar venda
curl --request POST \
--url https://public-api.repediu.com.br/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"items": [
{
"id": "<string>",
"index": 123,
"name": "<string>",
"quantity": 123,
"unitPrice": {
"value": 123,
"currency": "BRL"
},
"totalPrice": {
"value": 123,
"currency": "BRL"
},
"category": "<string>",
"externalCode": "<string>",
"unit": "UN",
"ean": "<string>",
"specialInstructions": "<string>",
"originalPrice": {
"value": 123,
"currency": "BRL"
},
"optionsPrice": {
"number": 123,
"currency": "<string>"
},
"options": [
{
"id": "<string>",
"name": "<string>",
"externalCode": "<string>",
"unit": "<string>",
"quantity": 123,
"unitPrice": {
"value": 123,
"currency": "BRL"
},
"totalprice": {
"value": 123,
"currency": "BRL"
},
"type": "<string>",
"category": "<string>"
}
],
"pizza": {
"crust": "<string>",
"edge": "<string>"
}
}
],
"customer": {
"id": "<string>",
"name": "<string>",
"documentNumber": "<string>",
"phone": {
"number": "<string>",
"extension": "+55"
},
"email": "<string>",
"birthDate": "2023-12-25",
"loyaltyPoints": 123,
"gender": 123,
"ordersCountOnMerchant": 123
},
"type": "<string>",
"displayId": "<string>",
"sourceAppId": "<string>",
"salesChannel": "<string>",
"storeChannel": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"lastEvent": "<string>",
"preparationStartDateTime": "2023-11-07T05:31:56Z",
"discounts": [
{
"amount": {
"value": 123,
"currency": "BRL"
},
"target": "<string>",
"targetId": "<string>",
"sponsorshipValue": [
{
"name": {
"value": "<string>"
},
"value": {
"amount": 123
},
"description": {
"value": "<string>"
}
}
]
}
],
"total": {
"itemsPrice": {
"value": 123,
"currency": "BRL"
},
"otherFees": {
"value": 123,
"currency": "BRL"
},
"discount": {
"value": 123,
"currency": "BRL"
},
"orderAmount": {
"value": 123,
"currency": "BRL"
}
},
"delivery": {
"deliveredBy": "MERCHANT",
"deliveryAddress": {
"country": "<string>",
"state": "<string>",
"city": "<string>",
"district": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"reference": "<string>",
"formattedAddress": "<string>",
"postalCode": "<string>",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"estimateDateTime": "2023-11-07T05:31:56Z"
},
"otherFees": [
{
"name": "<string>",
"type": "<string>",
"price": {
"value": 123,
"currency": "BRL"
}
}
],
"merchant": {
"id": "<string>",
"name": "<string>"
}
}
]
'import requests
url = "https://public-api.repediu.com.br/orders"
payload = [
{
"id": "<string>",
"items": [
{
"id": "<string>",
"index": 123,
"name": "<string>",
"quantity": 123,
"unitPrice": {
"value": 123,
"currency": "BRL"
},
"totalPrice": {
"value": 123,
"currency": "BRL"
},
"category": "<string>",
"externalCode": "<string>",
"unit": "UN",
"ean": "<string>",
"specialInstructions": "<string>",
"originalPrice": {
"value": 123,
"currency": "BRL"
},
"optionsPrice": {
"number": 123,
"currency": "<string>"
},
"options": [
{
"id": "<string>",
"name": "<string>",
"externalCode": "<string>",
"unit": "<string>",
"quantity": 123,
"unitPrice": {
"value": 123,
"currency": "BRL"
},
"totalprice": {
"value": 123,
"currency": "BRL"
},
"type": "<string>",
"category": "<string>"
}
],
"pizza": {
"crust": "<string>",
"edge": "<string>"
}
}
],
"customer": {
"id": "<string>",
"name": "<string>",
"documentNumber": "<string>",
"phone": {
"number": "<string>",
"extension": "+55"
},
"email": "<string>",
"birthDate": "2023-12-25",
"loyaltyPoints": 123,
"gender": 123,
"ordersCountOnMerchant": 123
},
"type": "<string>",
"displayId": "<string>",
"sourceAppId": "<string>",
"salesChannel": "<string>",
"storeChannel": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"lastEvent": "<string>",
"preparationStartDateTime": "2023-11-07T05:31:56Z",
"discounts": [
{
"amount": {
"value": 123,
"currency": "BRL"
},
"target": "<string>",
"targetId": "<string>",
"sponsorshipValue": [
{
"name": { "value": "<string>" },
"value": { "amount": 123 },
"description": { "value": "<string>" }
}
]
}
],
"total": {
"itemsPrice": {
"value": 123,
"currency": "BRL"
},
"otherFees": {
"value": 123,
"currency": "BRL"
},
"discount": {
"value": 123,
"currency": "BRL"
},
"orderAmount": {
"value": 123,
"currency": "BRL"
}
},
"delivery": {
"deliveredBy": "MERCHANT",
"deliveryAddress": {
"country": "<string>",
"state": "<string>",
"city": "<string>",
"district": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"reference": "<string>",
"formattedAddress": "<string>",
"postalCode": "<string>",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"estimateDateTime": "2023-11-07T05:31:56Z"
},
"otherFees": [
{
"name": "<string>",
"type": "<string>",
"price": {
"value": 123,
"currency": "BRL"
}
}
],
"merchant": {
"id": "<string>",
"name": "<string>"
}
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '<string>',
items: [
{
id: '<string>',
index: 123,
name: '<string>',
quantity: 123,
unitPrice: {value: 123, currency: 'BRL'},
totalPrice: {value: 123, currency: 'BRL'},
category: '<string>',
externalCode: '<string>',
unit: 'UN',
ean: '<string>',
specialInstructions: '<string>',
originalPrice: {value: 123, currency: 'BRL'},
optionsPrice: {number: 123, currency: '<string>'},
options: [
{
id: '<string>',
name: '<string>',
externalCode: '<string>',
unit: '<string>',
quantity: 123,
unitPrice: {value: 123, currency: 'BRL'},
totalprice: {value: 123, currency: 'BRL'},
type: '<string>',
category: '<string>'
}
],
pizza: {crust: '<string>', edge: '<string>'}
}
],
customer: {
id: '<string>',
name: '<string>',
documentNumber: '<string>',
phone: {number: '<string>', extension: '+55'},
email: '<string>',
birthDate: '2023-12-25',
loyaltyPoints: 123,
gender: 123,
ordersCountOnMerchant: 123
},
type: '<string>',
displayId: '<string>',
sourceAppId: '<string>',
salesChannel: '<string>',
storeChannel: '<string>',
createdAt: '2023-11-07T05:31:56Z',
lastEvent: '<string>',
preparationStartDateTime: '2023-11-07T05:31:56Z',
discounts: [
{
amount: {value: 123, currency: 'BRL'},
target: '<string>',
targetId: '<string>',
sponsorshipValue: [
{
name: {value: '<string>'},
value: {amount: 123},
description: {value: '<string>'}
}
]
}
],
total: {
itemsPrice: {value: 123, currency: 'BRL'},
otherFees: {value: 123, currency: 'BRL'},
discount: {value: 123, currency: 'BRL'},
orderAmount: {value: 123, currency: 'BRL'}
},
delivery: {
deliveredBy: 'MERCHANT',
deliveryAddress: {
country: '<string>',
state: '<string>',
city: '<string>',
district: '<string>',
street: '<string>',
number: '<string>',
complement: '<string>',
reference: '<string>',
formattedAddress: '<string>',
postalCode: '<string>',
coordinates: {latitude: 123, longitude: 123}
},
estimateDateTime: '2023-11-07T05:31:56Z'
},
otherFees: [{name: '<string>', type: '<string>', price: {value: 123, currency: 'BRL'}}],
merchant: {id: '<string>', name: '<string>'}
}
])
};
fetch('https://public-api.repediu.com.br/orders', 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://public-api.repediu.com.br/orders",
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([
[
'id' => '<string>',
'items' => [
[
'id' => '<string>',
'index' => 123,
'name' => '<string>',
'quantity' => 123,
'unitPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'totalPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'category' => '<string>',
'externalCode' => '<string>',
'unit' => 'UN',
'ean' => '<string>',
'specialInstructions' => '<string>',
'originalPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'optionsPrice' => [
'number' => 123,
'currency' => '<string>'
],
'options' => [
[
'id' => '<string>',
'name' => '<string>',
'externalCode' => '<string>',
'unit' => '<string>',
'quantity' => 123,
'unitPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'totalprice' => [
'value' => 123,
'currency' => 'BRL'
],
'type' => '<string>',
'category' => '<string>'
]
],
'pizza' => [
'crust' => '<string>',
'edge' => '<string>'
]
]
],
'customer' => [
'id' => '<string>',
'name' => '<string>',
'documentNumber' => '<string>',
'phone' => [
'number' => '<string>',
'extension' => '+55'
],
'email' => '<string>',
'birthDate' => '2023-12-25',
'loyaltyPoints' => 123,
'gender' => 123,
'ordersCountOnMerchant' => 123
],
'type' => '<string>',
'displayId' => '<string>',
'sourceAppId' => '<string>',
'salesChannel' => '<string>',
'storeChannel' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'lastEvent' => '<string>',
'preparationStartDateTime' => '2023-11-07T05:31:56Z',
'discounts' => [
[
'amount' => [
'value' => 123,
'currency' => 'BRL'
],
'target' => '<string>',
'targetId' => '<string>',
'sponsorshipValue' => [
[
'name' => [
'value' => '<string>'
],
'value' => [
'amount' => 123
],
'description' => [
'value' => '<string>'
]
]
]
]
],
'total' => [
'itemsPrice' => [
'value' => 123,
'currency' => 'BRL'
],
'otherFees' => [
'value' => 123,
'currency' => 'BRL'
],
'discount' => [
'value' => 123,
'currency' => 'BRL'
],
'orderAmount' => [
'value' => 123,
'currency' => 'BRL'
]
],
'delivery' => [
'deliveredBy' => 'MERCHANT',
'deliveryAddress' => [
'country' => '<string>',
'state' => '<string>',
'city' => '<string>',
'district' => '<string>',
'street' => '<string>',
'number' => '<string>',
'complement' => '<string>',
'reference' => '<string>',
'formattedAddress' => '<string>',
'postalCode' => '<string>',
'coordinates' => [
'latitude' => 123,
'longitude' => 123
]
],
'estimateDateTime' => '2023-11-07T05:31:56Z'
],
'otherFees' => [
[
'name' => '<string>',
'type' => '<string>',
'price' => [
'value' => 123,
'currency' => 'BRL'
]
]
],
'merchant' => [
'id' => '<string>',
'name' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://public-api.repediu.com.br/orders"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"index\": 123,\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"category\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"UN\",\n \"ean\": \"<string>\",\n \"specialInstructions\": \"<string>\",\n \"originalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"optionsPrice\": {\n \"number\": 123,\n \"currency\": \"<string>\"\n },\n \"options\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalprice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"type\": \"<string>\",\n \"category\": \"<string>\"\n }\n ],\n \"pizza\": {\n \"crust\": \"<string>\",\n \"edge\": \"<string>\"\n }\n }\n ],\n \"customer\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"phone\": {\n \"number\": \"<string>\",\n \"extension\": \"+55\"\n },\n \"email\": \"<string>\",\n \"birthDate\": \"2023-12-25\",\n \"loyaltyPoints\": 123,\n \"gender\": 123,\n \"ordersCountOnMerchant\": 123\n },\n \"type\": \"<string>\",\n \"displayId\": \"<string>\",\n \"sourceAppId\": \"<string>\",\n \"salesChannel\": \"<string>\",\n \"storeChannel\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"lastEvent\": \"<string>\",\n \"preparationStartDateTime\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"amount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"target\": \"<string>\",\n \"targetId\": \"<string>\",\n \"sponsorshipValue\": [\n {\n \"name\": {\n \"value\": \"<string>\"\n },\n \"value\": {\n \"amount\": 123\n },\n \"description\": {\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"total\": {\n \"itemsPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"otherFees\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"discount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"orderAmount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n },\n \"delivery\": {\n \"deliveredBy\": \"MERCHANT\",\n \"deliveryAddress\": {\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"reference\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"estimateDateTime\": \"2023-11-07T05:31:56Z\"\n },\n \"otherFees\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n }\n ],\n \"merchant\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://public-api.repediu.com.br/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"index\": 123,\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"category\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"UN\",\n \"ean\": \"<string>\",\n \"specialInstructions\": \"<string>\",\n \"originalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"optionsPrice\": {\n \"number\": 123,\n \"currency\": \"<string>\"\n },\n \"options\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalprice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"type\": \"<string>\",\n \"category\": \"<string>\"\n }\n ],\n \"pizza\": {\n \"crust\": \"<string>\",\n \"edge\": \"<string>\"\n }\n }\n ],\n \"customer\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"phone\": {\n \"number\": \"<string>\",\n \"extension\": \"+55\"\n },\n \"email\": \"<string>\",\n \"birthDate\": \"2023-12-25\",\n \"loyaltyPoints\": 123,\n \"gender\": 123,\n \"ordersCountOnMerchant\": 123\n },\n \"type\": \"<string>\",\n \"displayId\": \"<string>\",\n \"sourceAppId\": \"<string>\",\n \"salesChannel\": \"<string>\",\n \"storeChannel\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"lastEvent\": \"<string>\",\n \"preparationStartDateTime\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"amount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"target\": \"<string>\",\n \"targetId\": \"<string>\",\n \"sponsorshipValue\": [\n {\n \"name\": {\n \"value\": \"<string>\"\n },\n \"value\": {\n \"amount\": 123\n },\n \"description\": {\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"total\": {\n \"itemsPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"otherFees\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"discount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"orderAmount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n },\n \"delivery\": {\n \"deliveredBy\": \"MERCHANT\",\n \"deliveryAddress\": {\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"reference\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"estimateDateTime\": \"2023-11-07T05:31:56Z\"\n },\n \"otherFees\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n }\n ],\n \"merchant\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.repediu.com.br/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"index\": 123,\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"category\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"UN\",\n \"ean\": \"<string>\",\n \"specialInstructions\": \"<string>\",\n \"originalPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"optionsPrice\": {\n \"number\": 123,\n \"currency\": \"<string>\"\n },\n \"options\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"externalCode\": \"<string>\",\n \"unit\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"totalprice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"type\": \"<string>\",\n \"category\": \"<string>\"\n }\n ],\n \"pizza\": {\n \"crust\": \"<string>\",\n \"edge\": \"<string>\"\n }\n }\n ],\n \"customer\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"documentNumber\": \"<string>\",\n \"phone\": {\n \"number\": \"<string>\",\n \"extension\": \"+55\"\n },\n \"email\": \"<string>\",\n \"birthDate\": \"2023-12-25\",\n \"loyaltyPoints\": 123,\n \"gender\": 123,\n \"ordersCountOnMerchant\": 123\n },\n \"type\": \"<string>\",\n \"displayId\": \"<string>\",\n \"sourceAppId\": \"<string>\",\n \"salesChannel\": \"<string>\",\n \"storeChannel\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"lastEvent\": \"<string>\",\n \"preparationStartDateTime\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"amount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"target\": \"<string>\",\n \"targetId\": \"<string>\",\n \"sponsorshipValue\": [\n {\n \"name\": {\n \"value\": \"<string>\"\n },\n \"value\": {\n \"amount\": 123\n },\n \"description\": {\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"total\": {\n \"itemsPrice\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"otherFees\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"discount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n },\n \"orderAmount\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n },\n \"delivery\": {\n \"deliveredBy\": \"MERCHANT\",\n \"deliveryAddress\": {\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"reference\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"coordinates\": {\n \"latitude\": 123,\n \"longitude\": 123\n }\n },\n \"estimateDateTime\": \"2023-11-07T05:31:56Z\"\n },\n \"otherFees\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": {\n \"value\": 123,\n \"currency\": \"BRL\"\n }\n }\n ],\n \"merchant\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n }\n]"
response = http.request(request)
puts response.read_body{
"result": "Sales queued successfully",
"error": null,
"timeGenerated": "2025-09-26T14:38:34.0739726Z",
"success": true
}
Envia vendas para a Repediu, no mesmo formato de payload do padrão Open Delivery (itens, descontos, entrega, cliente). Suporta até 500 vendas por requisição.
items e customer são obrigatórios de fato: uma venda sem items ou sem customer causa um erro interno (HTTP 500), não um 400 com mensagem clara. Sempre envie os dois. O campo merchant é aceito mas ignorado — o estabelecimento é resolvido pelo token, não por este campo.Comportamento síncrono x assíncrono
Em produção, o processamento é sempre assíncrono (enfileirado) — a venda fica disponível no dia seguinte. O texto retornado varia conforme o horário do envio:
"Sales saved successfully" durante a janela de manutenção diária (03:00–08:00 UTC) ou "Sales queued successfully" fora dela — em ambos os casos a venda é enfileirada. Processamento síncrono (venda aparece imediatamente) só ocorre em homologação.| Ambiente | Comportamento | Resposta |
|---|---|---|
| Homologação | Síncrono — vendas aparecem na Repediu imediatamente. Não recomendado para altas cargas. | "Sales saved successfully" |
| Produção | Sempre assíncrono (enfileirado) — disponível no próximo dia. Recomendado para alta carga. | "Sales queued successfully" (ou "Sales saved successfully" dentro da janela de manutenção 03:00–08:00 UTC — a venda é enfileirada do mesmo jeito) |
Deduplicação
A deduplicação aplicada nesta rota é por colisão de canal: se osalesChannel de uma venda coincide (após normalização — minúsculas, sem espaços/traços/underscores, sem sufixo de versão) com o nome de outra integração ativa da mesma empresa, a venda é descartada silenciosamente (sem erro visível). Deduplicação adicional por id repetido ou por proximidade de horário entre vendas do mesmo cliente pode ocorrer em etapas posteriores de processamento, fora desta rota.
Erros
| HTTP | Mensagem | Quando acontece |
|---|---|---|
400 | No sales found, please check the request | Lista vazia |
400 | Only 500 sales per requisition are allowed | Mais de 500 itens |
400 | Company not found | Empresa não encontrada para o token |
400 | Integration not found | Integração não encontrada |
400 | Lista de vendas com ExternalCode/Message/Success | Só no caminho síncrono (homologação): uma ou mais vendas falharam individualmente |
Atualizar clientes
Depois de enviar vendas, mantenha os dados de clientes atualizados.
Autorizações
Token emitido por POST /authentication/users/accessToken. Envie no header Authorization como Bearer <token>. Válido por 6 horas.
Corpo
application/json
Maximum array length:
500Show child attributes
Show child attributes
Show child attributes
Show child attributes
Valor livre — DELIVERY, TAKEOUT e INDOOR são os únicos mapeados internamente.
Usado para filtro de deduplicação por canal entre integrações da mesma empresa.
Aceito mas não processado por esta API.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Aceito pela API mas não utilizado na resolução do estabelecimento — o merchant é resolvido pelo token, não por este campo.
Show child attributes
Show child attributes
⌘I

