### List Customers with Limit Source: https://api-docs.omni.chat/ Demonstrates how to list customers using the `limit` parameter for pagination. This example shows fetching the first 100 customers. ```APIDOC ## GET /customers ### Description Retrieves a list of customers. Supports pagination using the `limit` parameter. ### Method GET ### Endpoint `https://api.omni.chat/v1/customers` ### Query Parameters - **limit** (integer) - Optional - The maximum number of objects to return. Defaults to 100. Maximum allowed is 100. ### Request Example ```bash curl "https://api.omni.chat/v1/customers?limit=100" \ -H 'x-api-key: ' \ -H 'x-api-secret: ' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` ``` -------------------------------- ### List Customers with Limit and Offset Source: https://api-docs.omni.chat/ Paginate through customer lists using `limit` and `offset`. This example fetches the second page of results (100-199). ```bash curl"https://api.omni.chat/v1/customers?limit=100&offset=100" \ -H 'x-api-key: ' \ -H 'x-api-secret: ' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### List Customers with Limit and Offset (Deprecated) Source: https://api-docs.omni.chat/ This example shows the older method of pagination using `limit` and `offset`. Note that `offset` is being removed and a new pagination strategy is recommended. ```APIDOC ## GET /customers ### Description Retrieves a list of customers using `limit` and `offset` for pagination. This method is being deprecated. ### Method GET ### Endpoint `https://api.omni.chat/v1/customers` ### Query Parameters - **limit** (integer) - Optional - The maximum number of objects to return. - **offset** (integer) - Optional - The number of objects to skip. This parameter is being removed. ### Request Example ```bash # List 0 - 99 customers curl "https://api.omni.chat/v1/customers?limit=100" \ -H 'x-api-key: ' \ -H 'x-api-secret: ' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' # List 100 - 199 customers curl"https://api.omni.chat/v1/customers?limit=100&offset=100" \ -H 'x-api-key: ' \ -H 'x-api-secret: ' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` ``` -------------------------------- ### List Users with Sorting and Date Filtering Source: https://api-docs.omni.chat/ Example of filtering and sorting users. This demonstrates using `order.createdAt` for sorting and `createdAt.gt`/`createdAt.lt` for date range filtering. ```APIDOC ## GET /users ### Description Retrieves a list of users, with options for sorting and filtering by creation date. ### Method GET ### Endpoint `https://api.omni.chat/v1/users` ### Query Parameters - **order.createdAt** (string) - Optional - Sorts users by creation date. Accepts `ASC` or `DESC`. - **createdAt.gt** (string) - Optional - Filters users created after this date. - **createdAt.lt** (string) - Optional - Filters users created before this date. ### Request Example ```bash curl "https://api.omni.chat/v1/users?order.createdAt=DESC&createdAt.gt=2021-08-01&createdAt.lt=2021-08-16" \ -H 'x-api-key: ' \ -H 'x-api-secret: ' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` ``` -------------------------------- ### Get Single Product Price Source: https://api-docs.omni.chat/ Retrieves a single price for a product. ```APIDOC ## GET /products/{objectId}/prices/{priceId} ### Description Retrieves a single price for a product. ### Method GET ### Endpoint https://api.omni.chat/v1/products/{objectId}/prices/{priceId} ### Parameters #### Path Parameters - **objectId** (string) - Required - The ID of the product. - **priceId** (string) - Required - The ID of the price to retrieve. #### Header Parameters - **x-api-secret** (string) - Required - Your API secret. ### Response #### Success Response (200) - **price** (number) - The price of the product. - **salePrice** (number) - The sale price of the product. - **active** (boolean) - Indicates if the price is active. - **variant** (object) - Information about the associated variant. - **pricingTable** (object) - Information about the associated pricing table. #### Response Example ```json { "price": 0, "salePrice": 0, "active": true, "variant": { }, "pricingTable": { } } ``` #### Error Response (404) (No specific fields mentioned in the source for a 404 response body.) ``` -------------------------------- ### Get Single Product Source: https://api-docs.omni.chat/ Retrieves details for a specific product using its unique object ID. ```APIDOC ## GET /products/{objectId} ### Description Retrieves details for a specific product using its unique object ID. ### Method GET ### Endpoint https://api.omni.chat/v1/products/{objectId} ### Path Parameters - **objectId** (string) - Required - The unique identifier of the product. ### Header Parameters - **x-api-secret** (string) - Required - Your API secret key. ### Responses #### Success Response (200) (Response details not specified in source) #### Error Responses - **404** Not Found ``` -------------------------------- ### Count Customers Source: https://api-docs.omni.chat/ Get the total count of customers. Requires `x-api-key` and `x-api-secret` headers. ```bash ## Count customers curl "https://api.omni.chat/v1/customers/count" -H "x-api-key: xR2DkhOEDsazac7iiaV6U9kwYJ3l26SIaE6UGVg2" -H "x-api-secret: r:0dfa3a7d4ffd4010c055d8f745bf8164" -H "Content-Type: application/json" ``` -------------------------------- ### Get Single Team Response Sample (200) Source: https://api-docs.omni.chat/ This is a sample response when successfully retrieving a single team's details. ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "users": [ { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "disabled": true, "picture": "string" } ], "supervisors": [ { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "disabled": true, "picture": "string" } ], "teamGroups": [ null ], "isAutomaticDistributionEnabled": true, "automaticDistributionCapacity": 0 } ``` -------------------------------- ### List Chats with Date Filtering Source: https://api-docs.omni.chat/ Example of how to list chats using date range filters. The `createdAt.gt` and `createdAt.lt` parameters allow filtering by creation date. ```APIDOC ## GET /chats ### Description Retrieves a list of chats, with options to filter by creation date. ### Method GET ### Endpoint `https://api.omni.chat/v1/chats` ### Query Parameters - **createdAt.gt** (string) - Optional - Filters chats created after this date. - **createdAt.lt** (string) - Optional - Filters chats created before this date. ### Request Example ```bash curl "https://api.omni.chat/v1/chats?createdAt.gt=2021-08-25T20:20:00.000&createdAt.lt=2021-08-28T20:30:00.000" \ -H 'x-api-key: ' \ -H 'x-api-secret: ' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` ``` -------------------------------- ### Get Customer by ID Source: https://api-docs.omni.chat/ Retrieves a single customer by their unique object ID. ```APIDOC ## Get Customer by ID Obter um único cliente ### Description Retrieves a single customer by their unique object ID. ### Method GET ### Endpoint https://api.omni.chat/v1/customers/{objectId} ### Parameters #### Path Parameters - **objectId** (string) - Required - The unique identifier of the customer. #### Header Parameters - **x-api-secret** (string) - Required - API secret key. ### Responses #### Success Response (200) (Response structure is the same as the 'List Customers' success response) #### Error Response (404) - Not Found: Indicates the customer with the specified ID was not found. ``` -------------------------------- ### Get Team Source: https://api-docs.omni.chat/ Retrieves details of a specific team using its object ID. ```APIDOC ## GET /v1/teams/{objectId} ### Description Retrieves details of a specific team using its object ID. ### Method GET ### Endpoint https://api.omni.chat/v1/teams/{objectId} ### Parameters #### Path Parameters - **objectId** (string) - Required - #### Header Parameters - **x-api-secret** (string) - Required - ### Response #### Success Response (200) - **objectId** (string) - Description - **createdAt** (string) - Description - **updatedAt** (string) - Description - **name** (string) - Description - **users** (array) - Description - **supervisors** (array) - Description - **teamGroups** (array) - Description - **isAutomaticDistributionEnabled** (boolean) - Description - **automaticDistributionCapacity** (number) - Description #### Response Example ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "users": [ { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "disabled": true, "picture": "string" } ], "supervisors": [ { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "disabled": true, "picture": "string" } ], "teamGroups": [ null ], "isAutomaticDistributionEnabled": true, "automaticDistributionCapacity": 0 } ``` ``` -------------------------------- ### Product Response Sample (200 OK) Source: https://api-docs.omni.chat/ This is a sample JSON response for a successful product retrieval. It includes detailed information about the product and its main variant. ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "definition1": "string", "definition1Values": [ "string" ], "definition2": "string", "definition2Values": [ "string" ], "erpId": "string", "externalId": "string", "blocked": false, "service": false, "trackInventory": false, "sellOutOfStock": false, "enablePricingTable": false, "mainVariant": { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "weight": 0, "length": 0, "height": 0, "width": 0, "price": 0, "salePrice": 0, "quantity": 0, "erpId": "string", "externalId": "string", "definition1Value": "string", "definition2Value": "string", "imageUrl": "string", "visible": true }, "variants": [ { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "weight": 0, "length": 0, "height": 0, "width": 0, "price": 0, "salePrice": 0, "quantity": 0, "erpId": "string", "externalId": "string", "definition1Value": "string", "definition2Value": "string", "imageUrl": "string", "visible": true } ] } ``` -------------------------------- ### List Customers Response Sample Source: https://api-docs.omni.chat/ This is a sample JSON response when listing customers. It includes details for each customer such as objectId, creation date, name, contact information, and address. ```json { "results": [ { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "lastName": "string", "acceptsMarketing": "string", "email": "string", "phoneAreaCode": "string", "phoneCountryCode": "string", "phoneNumber": "string", "businessName": "string", "birthDate": "string", "maskedBirthDate": "string", "businessAccount": true, "taxDocumentNumber": "string", "salesPerson": { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "disabled": true, "picture": "string" }, "address": [ { "name": "string", "addressLine1": "string", "addressLine2": "string", "number": "string", "suburb": "string", "state": "string", "country": "string", "zip": "string" } ], "gender": "male" } ] } ``` -------------------------------- ### Get Single Message Source: https://api-docs.omni.chat/ Retrieves details of a specific message using its unique object ID. ```APIDOC ## Obter uma única mensagem ### Description Retrieves a single message by its object ID. ### Method GET ### Endpoint https://api.omni.chat/v1/messages/{objectId} ### Path Parameters - **objectId** (string) - Required. The unique identifier of the message to retrieve. ### Header Parameters - **x-api-secret** (string) - Required ### Responses #### Success Response (200) 200 response ``` -------------------------------- ### Create Customer Source: https://api-docs.omni.chat/ Creates a new customer record. ```APIDOC ## Create Customer Create customer ### Description Creates a new customer record. ### Method POST ### Endpoint https://api.omni.chat/v1/customers ### Parameters #### Header Parameters - **x-api-secret** (string) - Required - API secret key. #### Request Body - **name** (string) - Required - Customer's first name. - **lastName** (string) - Required - Customer's last name. - **acceptsMarketing** (string) - Optional - Indicates if the customer accepts marketing communications. Default: "false". - **email** (string) - Optional - Customer's email address. - **phoneAreaCode** (string) - Optional - Customer's phone area code. - **phoneCountryCode** (string) - Optional - Customer's phone country code. Default: "55". - **phoneNumber** (string) - Optional - Customer's phone number. - **birthDate** (string) - Optional - Customer's birth date. - **businessAccount** (boolean) - Optional - Indicates if the customer is a business account. Default: false. - **businessName** (string) - Optional - Name of the business if the customer is a business account. - **taxDocumentNumber** (string) - Optional - Customer's tax document number (e.g., CPF). - **address** (object) - Optional - Customer's address details. - **name** (string) - Name of the address. - **addressLine1** (string) - First line of the address. - **addressLine2** (string) - Second line of the address. - **number** (string) - Street number. - **suburb** (string) - Suburb. - **state** (string) - State. - **country** (string) - Country. - **zip** (string) - Zip code. - **gender** (string) - Optional - Customer's gender. Enum: "male", "female", "neutral", "other". ### Request Example ```json { "name": "string", "lastName": "string", "acceptsMarketing": "false", "email": "string", "phoneAreaCode": "string", "phoneCountryCode": "55", "phoneNumber": "string", "birthDate": "string", "businessAccount": false, "businessName": "string", "taxDocumentNumber": "string", "address": { "name": "string", "addressLine1": "string", "addressLine2": "string", "number": "string", "suburb": "string", "state": "string", "country": "string", "zip": "string" }, "gender": "male" } ``` ### Responses #### Success Response (201) - **objectId** (string) - Unique identifier for the newly created customer. - **createdAt** (string) - Timestamp when the customer was created. #### Response Example (201) ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z" } ``` ``` -------------------------------- ### Create Customer Request Sample Source: https://api-docs.omni.chat/ This is a sample JSON payload for creating a new customer. It includes fields for personal information, contact details, and address. The 'name' and 'lastName' fields are required. ```json { "name": "string", "lastName": "string", "acceptsMarketing": "false", "email": "string", "phoneAreaCode": "string", "phoneCountryCode": "55", "phoneNumber": "string", "birthDate": "string", "businessAccount": false, "businessName": "string", "taxDocumentNumber": "string", "address": { "name": "string", "addressLine1": "string", "addressLine2": "string", "number": "string", "suburb": "string", "state": "string", "country": "string", "zip": "string" }, "gender": "male" } ``` -------------------------------- ### List Product Variants Response Sample (200 OK) Source: https://api-docs.omni.chat/ This is a sample JSON response for listing product variants. It returns an array of variant objects. ```json { "results": [ { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "weight": 0, "length": 0, "height": 0, "width": 0, "price": 0, "salePrice": 0, "quantity": 0, "erpId": "string", "externalId": "string", "definition1Value": "string", "definition2Value": "string", "imageUrl": "string", "visible": true } ] } ``` -------------------------------- ### Product Variant Price List Response Source: https://api-docs.omni.chat/ Response sample for listing prices of a product by variant. Includes price details and associated variant/pricing table information. ```json { "price": 0, "salePrice": 0, "active": true, "variant": { }, "pricingTable": { } } ``` -------------------------------- ### Product Variant Creation Response Source: https://api-docs.omni.chat/ Response sample for successfully creating a product variant. It includes the object ID and creation timestamp. ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z" } ``` -------------------------------- ### Create Product Source: https://api-docs.omni.chat/ Creates a new product in the OmniChat system. This includes defining product details, variants, and inventory tracking options. ```APIDOC ## POST /products ### Description Creates a new product in the OmniChat system. ### Method POST ### Endpoint https://api.omni.chat/v1/products ### Request Body - **name** (string) - Required - Name of the product. - **productDescription** (string) - Required - Description of the product. - **erpId** (string) - Optional - Reference code for the product registered in the ERP. - **externalId** (string) - Optional - Reference code for the product in another platform being synchronized with OmniChat. - **definition1** (any) - Optional - Name of the first product variation (e.g., Color). - **definition1Values** (Array of strings) - Optional - All possible values for the first product definition (e.g., Blue, Green, Black). - **definition2** (string) - Optional - Name of the second product definition (e.g., Size). - **definition2Values** (Array of strings) - Optional - All possible values for the second product definition (e.g., S, M, L). - **blocked** (boolean) - Optional - Default: false. Indicates if the product is blocked for sales. - **service** (boolean) - Optional - Default: false. Indicates if the product is a service. - **trackInventory** (boolean) - Optional - Default: false. If true, OmniChat will control inventory. - **sellOutOfStock** (boolean) - Optional - Default: false. If this product can be sold with stock equal to or less than zero. - **enablePricingTable** (boolean) - Optional - Default: false. If this product can use the price table configuration. - **mainVariant** (object) - Required - The main variant of the product. - **variants** (Array of objects) - Required - All variants of this product, including the main variant. ### Request Example ```json { "name": "string", "productDescription": "string", "erpId": "string", "externalId": "string", "definition1": null, "definition1Values": [ "string" ], "definition2": "string", "definition2Values": [ "string" ], "blocked": false, "service": false, "trackInventory": false, "sellOutOfStock": false, "enablePricingTable": false, "mainVariant": { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "weight": 0, "length": 0, "height": 0, "width": 0, "price": 0, "salePrice": 0, "quantity": 0, "erpId": "string", "externalId": "string", "definition1Value": "string", "definition2Value": "string", "imageUrl": "string", "visible": true }, "variants": [ { "weight": 0, "length": 0, "height": 0, "width": 0, "price": 0, "salePrice": 0, "quantity": 0, "erpId": "string", "definition1Value": "string", "definition2Value": "string", "imageUrl": "string", "visible": true, "isMainVariant": true } ] } ``` ### Responses #### Success Response (201) - **objectId** (string) - Description of objectId. - **createdAt** (string) - Description of createdAt. #### Response Example (201) ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z" } ``` #### Error Responses - **400** Bad Request - **404** Not Found - **500** Internal Server Error ``` -------------------------------- ### Update Product Response Sample (200 OK) Source: https://api-docs.omni.chat/ This JSON sample represents a successful response after updating a product. It confirms the update with the new timestamp. ```json { "updatedAt": "2019-08-24T14:15:22Z" } ``` -------------------------------- ### Response Sample for Order Source: https://api-docs.omni.chat/ This is a sample JSON response for an order, detailing various fields related to customer information, items, shipping, and payment. ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "canAcceptBoleto": { }, "boletoInstructions": { "dueDate": "string", "installments": "string" }, "canAcceptCreditCard": true, "creditCardInstructions": { "installments": "string" }, "customer": { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "lastName": "string", "acceptsMarketing": "string", "email": "string", "phoneAreaCode": "string", "phoneCountryCode": "string", "phoneNumber": "string", "businessName": "string", "birthDate": "string", "maskedBirthDate": "string", "businessAccount": true, "taxDocumentNumber": "string", "salesPerson": { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "disabled": true, "picture": "string" }, "address": [ { "name": "string", "addressLine1": "string", "addressLine2": "string", "number": "string", "suburb": "string", "state": "string", "country": "string", "zip": "string" } ], "gender": "male" }, "deliveryTime": "string", "shippingCost": 0, "discountMode": "PERCENTAGE", "discount": 0, "paymentInstallmentsCount": 0, "items": [ { "objectId": "string", "name": "string", "description": "string", "price": 0, "productReference": "string", "quantity": 0, "variant": { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "weight": 0, "length": 0, "height": 0, "width": 0, "price": 0, "salePrice": 0, "quantity": 0, "erpId": "string", "externalId": "string", "definition1Value": "string", "definition2Value": "string", "imageUrl": "string", "visible": true }, "weight": 0, "length": 0, "height": 0, "width": 0, "sellerId": "string" } ], "notes": [ { "text": "string" } ], "pickUpInStore": true, "salesChannel": "string", "shippingAddress": { "name": "string", "addressLine1": "string", "addressLine2": "string", "number": "string", "suburb": "string", "state": "string", "country": "string", "zip": "string" }, "shippingMethod": "string", "paymentMethod": "CREDITCARD", "status": "CREATING", "paymentGatewayId": "string", "orderId": "string", "teamId": "string", "paymentDetail": { "TID": "string", "AuthorizationCode": "string", "NSU": "string" }, "paymentGatewayMundipagg": { "id": "string", "title": "string", "branch": { "merchantCategoryCode": "string", "paymentFacilitatorCode": "string", "code": "string", "name": "string", "phone": "string", "document": "string" } } } ``` -------------------------------- ### Branch Response Sample (200 OK) Source: https://api-docs.omni.chat/ This is a sample JSON response for a successful branch retrieval or update operation. It includes details like object ID, creation and update timestamps, address information, and trading hours. ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "zip": "string", "suburb": "string", "addressLine1": "string", "addressLine2": "string", "number": "string", "phone": "string", "identificator": "string", "city": "string", "addressState": "string", "country": "string", "tradingHours": { "monday": { "opens": true, "opensAt": "string", "closesAt": "string" }, "tuesday": { "opens": true, "opensAt": "string", "closesAt": "string" }, "wednesday": { "opens": true, "opensAt": "string", "closesAt": "string" }, "thursday": { "opens": true, "opensAt": "string", "closesAt": "string" }, "friday": { "opens": true, "opensAt": "string", "closesAt": "string" }, "saturday": { "opens": true, "opensAt": "string", "closesAt": "string" }, "sunday": { "opens": true, "opensAt": "string", "closesAt": "string" }, "timeZone": 0 } } ``` -------------------------------- ### Create Team Source: https://api-docs.omni.chat/ Creates a new team with specified configurations for SLA, automatic distribution, and capacity. ```APIDOC ## POST /v1/teams ### Description Creates a new team with specified configurations for SLA, automatic distribution, and capacity. ### Method POST ### Endpoint https://api.omni.chat/v1/teams ### Request Body - **name** (string) - Required - Nome do produto - **slaTiming** (number) - Required - Tempo em minutos da SLA - **slaRule** (object) - Required - Configuração da SLA do time - **isAutomaticDistributionEnabled** (boolean) - Required - Configuração da distribuição automática de atendimento - **automaticDistributionCapacity** (number) - Required - Capacidade máxima de atendimentos distribuido para um vendedor ### Request Example ```json { "name": "string", "slaTiming": 0, "slaRule": { "ruleData": { "teamId": "string" } }, "isAutomaticDistributionEnabled": true, "automaticDistributionCapacity": 0 } ``` ### Response #### Success Response (201) - **objectId** (string) - Description - **createdAt** (string) - Description #### Response Example ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z" } ``` ``` -------------------------------- ### Create Product Price Source: https://api-docs.omni.chat/ Creates a new price for a product. ```APIDOC ## POST /products/{objectId}/prices ### Description Creates a new price for a product. ### Method POST ### Endpoint https://api.omni.chat/v1/products/{objectId}/prices ### Parameters #### Path Parameters - **objectId** (string) - Required - The ID of the product. #### Header Parameters - **x-api-secret** (string) - Required - Your API secret. #### Request Body schema: application/json - **price** (number) - Required - The value of this price. Must be >= 0. - **salePrice** (number) - The sale price of this price. Must be >= 0. - **active** (boolean) - Optional - Defaults to true. If false, this price cannot be used in an order. - **variant** (string) - Required - The ObjectId of a variant. - **pricingTable** (string) - Required - The ObjectId of a pricing table. ### Request Example ```json { "price": 0, "salePrice": 0, "active": true, "variant": "string", "pricingTable": "string" } ``` ### Response #### Success Response (201) - **objectId** (string) - The ID of the created price. - **createdAt** (string) - The timestamp when the price was created. #### Response Example ```json { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z" } ``` #### Error Response (400, 404, 500) (No specific fields mentioned in the source for error response bodies.) ``` -------------------------------- ### List Customers with Limit Source: https://api-docs.omni.chat/ Retrieve a list of customers, applying a limit to the number of results per page. This is the first page of results (0-99). ```bash curl "https://api.omni.chat/v1/customers?limit=100" \ -H 'x-api-key: ' \ -H 'x-api-secret: ' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### Create Product Variant Source: https://api-docs.omni.chat/ Creates a new variant for a specified product. ```APIDOC ## POST /products/{objectId}/variants ### Description Creates a new variant for a product. ### Method POST ### Endpoint https://api.omni.chat/v1/products/{objectId}/variants ### Parameters #### Path Parameters - **objectId** (string) - Required - The unique identifier of the product to which the variant will be added. #### Header Parameters - **x-api-secret** (string) - Required - Your API secret for authentication. #### Request Body schema: application/json - **weight** (number) - Required - Weight of this variant in grams. - **length** (number) - Length of this variant in centimeters. - **height** (number) - Height of this variant in centimeters. - **width** (number) - Width of this variant in centimeters. - **price** (number) - Required - Price of this variant. - **salePrice** (number) - Sale price of this variant. - **quantity** (integer) - Stock quantity of this variant, applicable when product.trackInventory is true. - **erpId** (string) - The ERP system code associated with this variant, typically the barcode. - **definition1Value** (string) - The value of the first definition for this variant. Example: Blue. - **definition2Value** (string) - The value of the second definition for this variant. Example: S. - **imageUrl** (string) - The URL of the image for this variant. - **visible** (boolean) - Default: true. If false, this variant cannot be included in an order. - **isMainVariant** (boolean) - Default: true. Indicates if this should be the main variant for this product. Only one variant should be marked as true. ### Responses #### Success Response (200) Indicates successful creation of the variant. ``` -------------------------------- ### Delete Product Response Sample (200 OK) Source: https://api-docs.omni.chat/ A successful deletion of a product returns an empty JSON object. ```json { } ``` -------------------------------- ### Filter Users by Creation Date and Order Source: https://api-docs.omni.chat/ Filter users by creation date range (`createdAt.gt`, `createdAt.lt`) and sort in descending order by creation date (`order.createdAt=DESC`). ```bash curl "https://api.omni.chat/v1/users?order.createdAt=DESC&createdAt.gt=2021-08-01&createdAt.lt=2021-08-16" \ -H 'x-api-key: ' \ -H 'x-api-secret: ' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### List Product Variant Prices Source: https://api-docs.omni.chat/ Lists all prices associated with a specific product variant. ```APIDOC ## GET /products/{objectId}/variants/{variantId}/prices ### Description Lists all prices associated with a specific product variant. ### Method GET ### Endpoint https://api.omni.chat/v1/products/{objectId}/variants/{variantId}/prices ### Parameters #### Path Parameters - **objectId** (string) - Required - The ID of the product. - **variantId** (string) - Required - The ID of the variant. #### Header Parameters - **x-api-secret** (string) - Required - Your API secret. ### Response #### Success Response (200) - **price** (number) - The price of the variant. - **salePrice** (number) - The sale price of the variant. - **active** (boolean) - Indicates if the price is active. - **variant** (object) - Information about the variant. - **pricingTable** (object) - Information about the pricing table. #### Response Example ```json { "price": 0, "salePrice": 0, "active": true, "variant": { }, "pricingTable": { } } ``` #### Error Response (404) (No specific fields mentioned in the source for a 404 response body.) ``` -------------------------------- ### Sample Order Response Source: https://api-docs.omni.chat/ This is a sample JSON response for a successful order retrieval. It details various aspects of an order, including payment methods, customer information, and item details. ```json { "results": [ { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "canAcceptBoleto": { }, "boletoInstructions": { "dueDate": "string", "installments": "string" }, "canAcceptCreditCard": true, "creditCardInstructions": { "installments": "string" }, "customer": { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "lastName": "string", "acceptsMarketing": "string", "email": "string", "phoneAreaCode": "string", "phoneCountryCode": "string", "phoneNumber": "string", "businessName": "string", "birthDate": "string", "maskedBirthDate": "string", "businessAccount": true, "taxDocumentNumber": "string", "salesPerson": { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "name": "string", "disabled": true, "picture": "string" }, "address": [ { "name": "string", "addressLine1": "string", "addressLine2": "string", "number": "string", "suburb": "string", "state": "string", "country": "string", "zip": "string" } ], "gender": "male" }, "deliveryTime": "string", "shippingCost": 0, "discountMode": "PERCENTAGE", "discount": 0, "paymentInstallmentsCount": 0, "items": [ { "objectId": "string", "name": "string", "description": "string", "price": 0, "productReference": "string", "quantity": 0, "variant": { "objectId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "weight": 0, "length": 0, "height": 0, "width": 0, "price": 0, "salePrice": 0, "quantity": 0, "erpId": "string", "externalId": "string", "definition1Value": "string", "definition2Value": "string", "imageUrl": "string", "visible": true }, "weight": 0, "length": 0, "height": 0, "width": 0, "sellerId": "string" } ], "notes": [ { "text": "string" } ], "pickUpInStore": true, "salesChannel": "string", "shippingAddress": { "name": "string", "addressLine1": "string", "addressLine2": "string", "number": "string", "suburb": "string", "state": "string", "country": "string", "zip": "string" }, "shippingMethod": "string", "paymentMethod": "CREDITCARD", "status": "CREATING", "paymentGatewayId": "string", "orderId": "string", "teamId": "string", "paymentDetail": { "TID": "string", "AuthorizationCode": "string", "NSU": "string" }, "paymentGatewayMundipagg": { "id": "string", "title": "string", "branch": { "merchantCategoryCode": "string", "paymentFacilitatorCode": "string", "code": "string", "name": "string", "phone": "string", "document": "string" } } } ] } ``` -------------------------------- ### Product Variant Update Response Source: https://api-docs.omni.chat/ Response sample for successfully updating a product variant. Includes the timestamp of the last update. ```json { "updatedAt": "2019-08-24T14:15:22Z" } ```