Queue - Notify Delivery
Endpoint to create objects in the processing queue related to delivery notifications.
📥 Postman Collection
URLs
| Method | URL | Action | Description |
|---|---|---|---|
| POST | /api/v1/integration/queue | Register | Creates an object in the processing queue for delivery notification |
| GET | /api/v1/integration/queue/{id} | View | Checks the processing status of an object in the queue |
Production:
{connect-producao}/api/v1/integration/queueStaging:
{connect-homologacao}/api/v1/integration/queueAuthentication
All requests require an access token obtained from the Security endpoint. The token must be sent in the AccessToken header.
Create Object in Queue
Request
Endpoint: POST {connect-producao}/api/v1/integration/queue
Headers:
AccessToken: {access_token}
Content-Type: application/jsonBody:
json
{
"action": "notify-delivery",
"data": {
"entrega_id": 57,
"fk_tiny_pedidos": 135,
"order_id": "3D3E-9E1A-45329",
"tiny_id": 1021986006,
"deliveryOperatorName": "Delivery Operator",
"deliveryOperatorDocument": "12345678900",
"deliveryOperatorLocation": 54000000109,
"status": "Delivered",
"entrega_created_at": "2025-05-20T02:00:00Z",
"entrega_updated_at": "2025-05-20T02:29:00Z"
}
}Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
entrega_id | number | Yes | Internal delivery ID |
fk_tiny_pedidos | number | Yes | Order ID in external system |
order_id | string | Yes | Unique order ID |
tiny_id | number | Yes | ID in Tiny system |
deliveryOperatorName | string | Yes | Delivery operator name |
deliveryOperatorDocument | string | Yes | Delivery operator document |
deliveryOperatorLocation | number | Yes | Operator location |
status | string | Yes | Delivery status |
entrega_created_at | string | Yes | Delivery creation date |
entrega_updated_at | string | Yes | Delivery update date |
Success Response
Status: 201 Created
json
{
"id": "uuid-of-object",
"created": "2025-01-01T00:00:00Z",
"iCode": 0,
"iMsg": "Object created successfully",
"processDate": null,
"processStatus": "pending",
"processMsg": null
}Check Processing
Request
Endpoint: GET {connect-producao}/api/v1/integration/queue/{id}
Headers:
AccessToken: {access_token}Success Response
Status: 200 OK
json
{
"id": "uuid-of-object",
"created": "2025-01-01T00:00:00Z",
"iCode": 0,
"iMsg": "Processed successfully",
"processDate": "2025-01-01T00:05:00Z",
"processStatus": "completed",
"processMsg": "Delivery notification processed",
"data": {
"entrega_id": 57,
"fk_tiny_pedidos": 135,
"order_id": "3D3E-9E1A-45329",
"tiny_id": 1021986006,
"deliveryOperatorName": "Delivery Operator",
"deliveryOperatorDocument": "12345678900",
"deliveryOperatorLocation": 54000000109,
"status": "Delivered",
"entrega_created_at": "2025-05-20T02:00:00Z",
"entrega_updated_at": "2025-05-20T02:29:00Z"
}
}Implementation Example
javascript
async function notifyDelivery(deliveryData, accessToken) {
const response = await fetch('{connect-producao}/api/v1/integration/queue', {
method: 'POST',
headers: {
'AccessToken': accessToken,
'Content-Type': 'application/json'
},
body: JSON.stringify({
action: 'notify-delivery',
data: deliveryData
})
});
if (!response.ok) {
throw new Error(`Error ${response.status}: ${response.statusText}`);
}
return await response.json();
}