curl --request POST \
--url https://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"integrationOrderId": "<string>",
"displayId": "<string>",
"deliveryFee": 123,
"comments": "<string>",
"clientData": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressExtra": "<string>"
},
"integrationIsPending": true,
"mustBeReadyAt": "2023-11-07T05:31:56Z",
"mustBeDeliveredAt": "2023-11-07T05:31:56Z",
"paidAmount": 123,
"paidTipAmount": 123,
"discountAmount": 123,
"products": [
{
"productId": "<string>",
"unitPrice": 123,
"name": "<string>",
"amount": 123,
"comment": "<string>",
"modifiers": [
{
"modifierQuantity": 123,
"modifierGroupId": "<string>",
"modifierGroupName": "<string>",
"modifierId": "<string>",
"unitPrice": 123,
"modifierName": "<string>"
}
]
}
]
}
'import requests
url = "https://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order"
payload = {
"integrationOrderId": "<string>",
"displayId": "<string>",
"deliveryFee": 123,
"comments": "<string>",
"clientData": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressExtra": "<string>"
},
"integrationIsPending": True,
"mustBeReadyAt": "2023-11-07T05:31:56Z",
"mustBeDeliveredAt": "2023-11-07T05:31:56Z",
"paidAmount": 123,
"paidTipAmount": 123,
"discountAmount": 123,
"products": [
{
"productId": "<string>",
"unitPrice": 123,
"name": "<string>",
"amount": 123,
"comment": "<string>",
"modifiers": [
{
"modifierQuantity": 123,
"modifierGroupId": "<string>",
"modifierGroupName": "<string>",
"modifierId": "<string>",
"unitPrice": 123,
"modifierName": "<string>"
}
]
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
integrationOrderId: '<string>',
displayId: '<string>',
deliveryFee: 123,
comments: '<string>',
clientData: {
name: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
addressLine1: '<string>',
addressLine2: '<string>',
addressExtra: '<string>'
},
integrationIsPending: true,
mustBeReadyAt: '2023-11-07T05:31:56Z',
mustBeDeliveredAt: '2023-11-07T05:31:56Z',
paidAmount: 123,
paidTipAmount: 123,
discountAmount: 123,
products: [
{
productId: '<string>',
unitPrice: 123,
name: '<string>',
amount: 123,
comment: '<string>',
modifiers: [
{
modifierQuantity: 123,
modifierGroupId: '<string>',
modifierGroupName: '<string>',
modifierId: '<string>',
unitPrice: 123,
modifierName: '<string>'
}
]
}
]
})
};
fetch('https://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order', 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://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order",
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([
'integrationOrderId' => '<string>',
'displayId' => '<string>',
'deliveryFee' => 123,
'comments' => '<string>',
'clientData' => [
'name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'addressLine1' => '<string>',
'addressLine2' => '<string>',
'addressExtra' => '<string>'
],
'integrationIsPending' => true,
'mustBeReadyAt' => '2023-11-07T05:31:56Z',
'mustBeDeliveredAt' => '2023-11-07T05:31:56Z',
'paidAmount' => 123,
'paidTipAmount' => 123,
'discountAmount' => 123,
'products' => [
[
'productId' => '<string>',
'unitPrice' => 123,
'name' => '<string>',
'amount' => 123,
'comment' => '<string>',
'modifiers' => [
[
'modifierQuantity' => 123,
'modifierGroupId' => '<string>',
'modifierGroupName' => '<string>',
'modifierId' => '<string>',
'unitPrice' => 123,
'modifierName' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order"
payload := strings.NewReader("{\n \"integrationOrderId\": \"<string>\",\n \"displayId\": \"<string>\",\n \"deliveryFee\": 123,\n \"comments\": \"<string>\",\n \"clientData\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"addressExtra\": \"<string>\"\n },\n \"integrationIsPending\": true,\n \"mustBeReadyAt\": \"2023-11-07T05:31:56Z\",\n \"mustBeDeliveredAt\": \"2023-11-07T05:31:56Z\",\n \"paidAmount\": 123,\n \"paidTipAmount\": 123,\n \"discountAmount\": 123,\n \"products\": [\n {\n \"productId\": \"<string>\",\n \"unitPrice\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"comment\": \"<string>\",\n \"modifiers\": [\n {\n \"modifierQuantity\": 123,\n \"modifierGroupId\": \"<string>\",\n \"modifierGroupName\": \"<string>\",\n \"modifierId\": \"<string>\",\n \"unitPrice\": 123,\n \"modifierName\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"integrationOrderId\": \"<string>\",\n \"displayId\": \"<string>\",\n \"deliveryFee\": 123,\n \"comments\": \"<string>\",\n \"clientData\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"addressExtra\": \"<string>\"\n },\n \"integrationIsPending\": true,\n \"mustBeReadyAt\": \"2023-11-07T05:31:56Z\",\n \"mustBeDeliveredAt\": \"2023-11-07T05:31:56Z\",\n \"paidAmount\": 123,\n \"paidTipAmount\": 123,\n \"discountAmount\": 123,\n \"products\": [\n {\n \"productId\": \"<string>\",\n \"unitPrice\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"comment\": \"<string>\",\n \"modifiers\": [\n {\n \"modifierQuantity\": 123,\n \"modifierGroupId\": \"<string>\",\n \"modifierGroupName\": \"<string>\",\n \"modifierId\": \"<string>\",\n \"unitPrice\": 123,\n \"modifierName\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"integrationOrderId\": \"<string>\",\n \"displayId\": \"<string>\",\n \"deliveryFee\": 123,\n \"comments\": \"<string>\",\n \"clientData\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"addressExtra\": \"<string>\"\n },\n \"integrationIsPending\": true,\n \"mustBeReadyAt\": \"2023-11-07T05:31:56Z\",\n \"mustBeDeliveredAt\": \"2023-11-07T05:31:56Z\",\n \"paidAmount\": 123,\n \"paidTipAmount\": 123,\n \"discountAmount\": 123,\n \"products\": [\n {\n \"productId\": \"<string>\",\n \"unitPrice\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"comment\": \"<string>\",\n \"modifiers\": [\n {\n \"modifierQuantity\": 123,\n \"modifierGroupId\": \"<string>\",\n \"modifierGroupName\": \"<string>\",\n \"modifierId\": \"<string>\",\n \"unitPrice\": 123,\n \"modifierName\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"order": {
"tabId": "<string>",
"integrationOrderId": "<string>"
}
}Crear pedido
Usa este método para inyectar un nuevo pedido a Crisp.
curl --request POST \
--url https://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"integrationOrderId": "<string>",
"displayId": "<string>",
"deliveryFee": 123,
"comments": "<string>",
"clientData": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressExtra": "<string>"
},
"integrationIsPending": true,
"mustBeReadyAt": "2023-11-07T05:31:56Z",
"mustBeDeliveredAt": "2023-11-07T05:31:56Z",
"paidAmount": 123,
"paidTipAmount": 123,
"discountAmount": 123,
"products": [
{
"productId": "<string>",
"unitPrice": 123,
"name": "<string>",
"amount": 123,
"comment": "<string>",
"modifiers": [
{
"modifierQuantity": 123,
"modifierGroupId": "<string>",
"modifierGroupName": "<string>",
"modifierId": "<string>",
"unitPrice": 123,
"modifierName": "<string>"
}
]
}
]
}
'import requests
url = "https://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order"
payload = {
"integrationOrderId": "<string>",
"displayId": "<string>",
"deliveryFee": 123,
"comments": "<string>",
"clientData": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressExtra": "<string>"
},
"integrationIsPending": True,
"mustBeReadyAt": "2023-11-07T05:31:56Z",
"mustBeDeliveredAt": "2023-11-07T05:31:56Z",
"paidAmount": 123,
"paidTipAmount": 123,
"discountAmount": 123,
"products": [
{
"productId": "<string>",
"unitPrice": 123,
"name": "<string>",
"amount": 123,
"comment": "<string>",
"modifiers": [
{
"modifierQuantity": 123,
"modifierGroupId": "<string>",
"modifierGroupName": "<string>",
"modifierId": "<string>",
"unitPrice": 123,
"modifierName": "<string>"
}
]
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
integrationOrderId: '<string>',
displayId: '<string>',
deliveryFee: 123,
comments: '<string>',
clientData: {
name: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
addressLine1: '<string>',
addressLine2: '<string>',
addressExtra: '<string>'
},
integrationIsPending: true,
mustBeReadyAt: '2023-11-07T05:31:56Z',
mustBeDeliveredAt: '2023-11-07T05:31:56Z',
paidAmount: 123,
paidTipAmount: 123,
discountAmount: 123,
products: [
{
productId: '<string>',
unitPrice: 123,
name: '<string>',
amount: 123,
comment: '<string>',
modifiers: [
{
modifierQuantity: 123,
modifierGroupId: '<string>',
modifierGroupName: '<string>',
modifierId: '<string>',
unitPrice: 123,
modifierName: '<string>'
}
]
}
]
})
};
fetch('https://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order', 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://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order",
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([
'integrationOrderId' => '<string>',
'displayId' => '<string>',
'deliveryFee' => 123,
'comments' => '<string>',
'clientData' => [
'name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'addressLine1' => '<string>',
'addressLine2' => '<string>',
'addressExtra' => '<string>'
],
'integrationIsPending' => true,
'mustBeReadyAt' => '2023-11-07T05:31:56Z',
'mustBeDeliveredAt' => '2023-11-07T05:31:56Z',
'paidAmount' => 123,
'paidTipAmount' => 123,
'discountAmount' => 123,
'products' => [
[
'productId' => '<string>',
'unitPrice' => 123,
'name' => '<string>',
'amount' => 123,
'comment' => '<string>',
'modifiers' => [
[
'modifierQuantity' => 123,
'modifierGroupId' => '<string>',
'modifierGroupName' => '<string>',
'modifierId' => '<string>',
'unitPrice' => 123,
'modifierName' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order"
payload := strings.NewReader("{\n \"integrationOrderId\": \"<string>\",\n \"displayId\": \"<string>\",\n \"deliveryFee\": 123,\n \"comments\": \"<string>\",\n \"clientData\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"addressExtra\": \"<string>\"\n },\n \"integrationIsPending\": true,\n \"mustBeReadyAt\": \"2023-11-07T05:31:56Z\",\n \"mustBeDeliveredAt\": \"2023-11-07T05:31:56Z\",\n \"paidAmount\": 123,\n \"paidTipAmount\": 123,\n \"discountAmount\": 123,\n \"products\": [\n {\n \"productId\": \"<string>\",\n \"unitPrice\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"comment\": \"<string>\",\n \"modifiers\": [\n {\n \"modifierQuantity\": 123,\n \"modifierGroupId\": \"<string>\",\n \"modifierGroupName\": \"<string>\",\n \"modifierId\": \"<string>\",\n \"unitPrice\": 123,\n \"modifierName\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"integrationOrderId\": \"<string>\",\n \"displayId\": \"<string>\",\n \"deliveryFee\": 123,\n \"comments\": \"<string>\",\n \"clientData\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"addressExtra\": \"<string>\"\n },\n \"integrationIsPending\": true,\n \"mustBeReadyAt\": \"2023-11-07T05:31:56Z\",\n \"mustBeDeliveredAt\": \"2023-11-07T05:31:56Z\",\n \"paidAmount\": 123,\n \"paidTipAmount\": 123,\n \"discountAmount\": 123,\n \"products\": [\n {\n \"productId\": \"<string>\",\n \"unitPrice\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"comment\": \"<string>\",\n \"modifiers\": [\n {\n \"modifierQuantity\": 123,\n \"modifierGroupId\": \"<string>\",\n \"modifierGroupName\": \"<string>\",\n \"modifierId\": \"<string>\",\n \"unitPrice\": 123,\n \"modifierName\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tabs.service.getjusto.com/api/integration/custom/{salesChannelConfigId}/inject-order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"integrationOrderId\": \"<string>\",\n \"displayId\": \"<string>\",\n \"deliveryFee\": 123,\n \"comments\": \"<string>\",\n \"clientData\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"addressExtra\": \"<string>\"\n },\n \"integrationIsPending\": true,\n \"mustBeReadyAt\": \"2023-11-07T05:31:56Z\",\n \"mustBeDeliveredAt\": \"2023-11-07T05:31:56Z\",\n \"paidAmount\": 123,\n \"paidTipAmount\": 123,\n \"discountAmount\": 123,\n \"products\": [\n {\n \"productId\": \"<string>\",\n \"unitPrice\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"comment\": \"<string>\",\n \"modifiers\": [\n {\n \"modifierQuantity\": 123,\n \"modifierGroupId\": \"<string>\",\n \"modifierGroupName\": \"<string>\",\n \"modifierId\": \"<string>\",\n \"unitPrice\": 123,\n \"modifierName\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"order": {
"tabId": "<string>",
"integrationOrderId": "<string>"
}
}Headers
Token de autenticación.
Path Parameters
El ID de la configuración de canal de ventas.
Body
El id del pedido en el sistema externo. Se usará para identificar el pedido en las otras llamadas. Cada ID debe ser único.
El número de pedido que se usará para identificar este pedido. Es un ID corto.
El tipo de entrega. Puede ser 'go' para pedidos de retiro o 'delivery' para pedidos con entrega al cliente.
go, delivery El costo de entrega del pedido. Solo para pedidos de entrega.
Comentarios sobre el pedido. Se verán en el panel de Crisp.
Información del cliente. Se verá en el panel de Crisp. Es opcional.
Show child attributes
Show child attributes
Si es verdadero, el pedido se marcará como pendiente en Crisp y se deberá aceptar. Si usas esta opción debes crear el webhook de aceptación de pedido.
La fecha y hora en la que el pedido debe estar listo para ser recogido o entregado.
La fecha y hora en la que el pedido debe ser entregado al cliente final.
El monto pagado por el cliente. No incluye propina. Si es que no es especifica, se asume que aún no está pagado.
El monto de propina pagado por el cliente. Si es que no es especifica, se asume que no se dejó propina.
El monto de descuento aplicado al pedido. Si es que no es especifica, se asume que no hay descuento.
Los productos del pedido.
Show child attributes
Show child attributes
Response
Order injected successfully
Show child attributes
Show child attributes