Log InGet demo

Sale

Endpoints for managing sales transactions in the system.

# Endpoints

  • GET/sales# Retrieve a list of sales with optional filters.
  • GET/sale/{sale_id}# Retrieve a specific sale by ID.
  • GET/sale/{sale_id}/statuses# Retrieve the available statuses for a sale.
  • GET/sale/{sale_id}/activity# Retrieve the activity log for a sale.
  • POST/sale/{sale_id}/status# Update the status of a sale.
  • POST/sale/{sale_id}/item/{product_id}/warehouse# Update the warehouse for a sale item.
  • POST/sale/{sale_id}/item/{product_id}/carrier# Update the carrier for a sale item.
  • POST/sale/{sale_id}/item/{product_id}/product-group# Update the product group for a sale item.
  • POST/sale/{sale_id}/invoice# Upload an invoice for a sale.

Sale

id

The unique identifier of the sale.

status

The current status of the sale. Available statuses: NEW, CONFIRMED, IN_DELIVERY, COMPLETED, CANCELED, REJECTED, REFUNDED.

client

Details of the client associated with the sale.

products

The list of products associated with the sale.

activity

The list of activities associated with the sale.

{} The Sale resource
1{
2 "id": "clz2me042000914c4o0ssjzds",
3 "secondary_id": "clz2me042000a14c4iolkjiqg",
4 "human_id": 24,
5 "team_id": "clymtb8g90000maj34h0mwyc5",
6 "channel_type": null,
7 "channel_id": "clysxnec500034rv0a82kaf2n",
8 "amount": 26.95,
9 "discount": 0,
10 "currency": "EUR",
11 "shipping_cost": 0,
12 "country": "Italy",
13 "status": "IN_DELIVERY",
14 "date": "2024-07-26T08:03:48.000Z",
15 "client": {
16 "id": "clz2me03o000414c4u9au45i4",
17 "name": "Luca Santini",
18 "email": "luca@gmail.com",
19 "delivery_address": {
20 "street": "Via Macedonio Melloni",
21 "city": "Milano",
22 "postal_code": "20129",
23 "country": "Italy"
24 },
25 "invoice_address": {
26 "street": "Via Macedonio Melloni",
27 "city": "Milano",
28 "postal_code": "20129",
29 "country": "Italy"
30 }
31 },
32 "products": [
33 {
34 "name": "The 3p Fulfilled Snowboard",
35 "sku": "1",
36 "qty": 1,
37 "price": 26.95,
38 "warehouse": {
39 "name": "UAE (sec)"
40 },
41 "carrier": {
42 "type": "DPD",
43 "tracking_code": "123456789",
44 "tracking_link": "https://www.dpdgroup.com/fr/mydpd/my-parcels/search?"
45 }
46 }
47 ],
48 "activity": [
49 {
50 "type": "DATA_COMMUNICATED_TO_CARRIER",
51 "created_at": "2024-07-30T09:50:58.940Z"
52 },
53 {
54 "type": "UPDATED_STATUS_BY_TEAM",
55 "status": "IN_DELIVERY",
56 "created_at": "2024-07-30T09:54:56.500Z"
57 }
58 ]
59}
get

Get List of Sales

Retrieve a list of sales with optional filters like channel, country, status, and pagination.

cURL
curl -X GET "https://api.omnilabs.sh/sales?channel=clysxnec500034rv0a82kaf2n&country=Italy&status=NEW&page=1&take=10" -H "Authorization: Bearer {{BEARER_TOKEN}}"

Parameters

channelstringoptional

The channel ID to filter sales by.

countrystringoptional

Filter sales by country.

statusstringoptional

Filter sales by status (e.g., NEW, COMPLETED, REFUNDED).

pagenumberoptional

The page number for pagination.

takenumberoptional

The number of sales to return per page.

Response
{
"data": [
{
"id": "cm1uu76rg007h44p58pe7r5qw",
"secondary_id": "5875814957289",
"human_id": 92,
"amount": 2629.95,
"country": "Italy",
"status": "NEW",
"channel": {
"name": "Test Store",
"type": "shopify"
}
}
],
"total": 1,
"take": 10,
"current_page": 1,
"last_page": 1
}
get

Get Sale by ID

Retrieve details of a specific sale by its ID.

cURL
curl -X GET "https://api.omnilabs.sh/sale/clz2me042000914c4o0ssjzds" -H "Authorization: Bearer {{BEARER_TOKEN}}"

Parameters

sale_idstringrequired

The unique ID of the sale.

Response
{
"id": "clz2me042000914c4o0ssjzds",
"secondary_id": "clz2me042000a14c4iolkjiqg",
"human_id": 24,
"team_id": "clymtb8g90000maj34h0mwyc5",
"channel_type": null,
"channel_id": "clysxnec500034rv0a82kaf2n",
"amount": 26.95,
"discount": 0,
"currency": "EUR",
"shipping_cost": 0,
"country": "Italy",
"status": "IN_DELIVERY",
"date": "2024-07-26T08:03:48.000Z",
"client": {
"id": "clz2me03o000414c4u9au45i4",
"name": "Luca Santini",
"email": "luca@gmail.com",
"delivery_address": {
"street": "Via Macedonio Melloni",
"city": "Milano",
"postal_code": "20129",
"country": "Italy"
},
"invoice_address": {
"street": "Via Macedonio Melloni",
"city": "Milano",
"postal_code": "20129",
"country": "Italy"
}
},
"products": [
{
"name": "The 3p Fulfilled Snowboard",
"sku": "1",
"qty": 1,
"price": 26.95,
"warehouse": {
"name": "UAE (sec)"
},
"carrier": {
"type": "DPD",
"tracking_code": "123456789",
"tracking_link": "https://www.dpdgroup.com/fr/mydpd/my-parcels/search?"
}
}
],
"activity": [
{
"type": "DATA_COMMUNICATED_TO_CARRIER",
"created_at": "2024-07-30T09:50:58.940Z"
},
{
"type": "UPDATED_STATUS_BY_TEAM",
"status": "IN_DELIVERY",
"created_at": "2024-07-30T09:54:56.500Z"
}
]
}
get

Get Available Sale Statuses

Retrieve the available statuses for a specific sale.

cURL
curl -X GET "https://api.omnilabs.sh/sale/clz2me042000914c4o0ssjzds/statuses" -H "Authorization: Bearer {{BEARER_TOKEN}}"

Parameters

sale_idstringrequired

The unique ID of the sale.

Response
[
"COMPLETED",
"REFUNDED"
]
get

Get Sale Activity

Retrieve the activity log for a specific sale.

cURL
curl -X GET "https://api.omnilabs.sh/sale/clz2me042000914c4o0ssjzds/activity" -H "Authorization: Bearer {{BEARER_TOKEN}}"

Parameters

sale_idstringrequired

The unique ID of the sale.

Response
[
{
"id": "clz88mtmk0009pxxg9vf81o9g",
"sale_id": "clz2me042000914c4o0ssjzds",
"type": "DATA_COMMUNICATED_TO_CARRIER",
"created_at": "2024-07-30T09:50:58.940Z"
},
{
"id": "clz88rwxf0007jc562ogn5evt",
"sale_id": "clz2me042000914c4o0ssjzds",
"type": "UPDATED_STATUS_BY_TEAM",
"status": "IN_DELIVERY",
"created_at": "2024-07-30T09:54:56.500Z"
}
]
post

Update Sale Status

Update the status of a sale (e.g., Completed, Refunded).

cURL
curl -X POST "https://api.omnilabs.sh/sale/clz2me042000914c4o0ssjzds/status" -H "Authorization: Bearer {{BEARER_TOKEN}}" -d '{"status": "REFUNDED"}'

Parameters

statusstringrequired

The new status of the sale (e.g., COMPLETED, REFUNDED).

Response
"ok"
post

Update Sale Item Warehouse

Update the warehouse for a sale item.

cURL
curl -X POST "https://api.omnilabs.sh/sale/clz2me042000914c4o0ssjzds/item/8657546117353/warehouse" -H "Authorization: Bearer {{BEARER_TOKEN}}" -d '{"warehouse_id": "clz16l7kf00058erfe50u5n4j", "user": "clysto2rr0005mvxmgblw0jl1"}'

Parameters

warehouse_idstringrequired

The warehouse ID to assign the item to.

userstringrequired

The user making the update.

Response
"ok"
post

Update Sale Item Carrier

Update the carrier for a sale item.

cURL
curl -X POST "https://api.omnilabs.sh/sale/clz2me042000914c4o0ssjzds/item/8657546117353/carrier" -H "Authorization: Bearer {{BEARER_TOKEN}}" -d '{"carrier_id": "clz16l7kf00058erfe50u5n4j", "user": "clysto2rr0005mvxmgblw0jl1"}'

Parameters

carrier_idstringrequired

The carrier ID to assign to the item.

userstringrequired

The user making the update.

Response
"ok"
post

Update Sale Item Product Group

Update the product group for a sale item.

cURL
curl -X POST "https://api.omnilabs.sh/sale/clz2me042000914c4o0ssjzds/item/8657546117353/product-group" -H "Authorization: Bearer {{BEARER_TOKEN}}" -d '{"product_group_id": "clz16l7kf00058erfe50u5n4j", "user": "clysto2rr0005mvxmgblw0jl1"}'

Parameters

product_group_idstringrequired

The product group ID to assign to the item.

userstringrequired

The user making the update.

Response
"ok"
post

Upload Sale Invoice

Upload an invoice for a sale.

cURL
curl -X POST "https://api.omnilabs.sh/sale/clz2me042000914c4o0ssjzds/invoice" -H "Authorization: Bearer {{BEARER_TOKEN}}" -d '{"user": "clysto2rr0005mvxmgblw0jl1", "invoice": "Base64 encoded string"}'

Parameters

userstringrequired

The user making the upload.

invoicestringrequired

Base64 encoded invoice data.

Response
"ok"
ยฉ Omnilabs 2026. All rights reserved.