Download OpenAPI specification:Download
Welcome to Elryan API Documentation. Elryan is the first online store in Iraq to provide a range of consumer electronics from world renowned brands delivered to your home within 24 hours.
This documentation explains how to use Elryan API endpoints and how to fill request parameters. Elryan API allows you to create and update your products in our systems, get orders and synchronize operations between your and Elryan's systems.
Once you have your products synchronized with Elryan API, we take care of the rest.
Orders will be consolidated and shown in the orders panel of the Marketplace. Also you can use order API endpoints to manage orders directly from your own systems.
There are two environments:
Staging: https://marketplacestaging.elryan.com/api
where you may try your requests and see the results both in the API responses and in Staging Marketplace.
Production: https://marketplace.elryan.com/api
where your real data will be stored and published to the Marketplace. You may see the results both in the API responses and in Production Marketplace
All your requests should use the following domain:
https://merchantstaging.elryan.com/api
To use this environment, you still need to get your token; Please ensure you have created a vendor account at Elryan Staging Marketplace and then you can generate your Bearer Token via Users / Generate Token service.
You can create/update/delete as many records as you like on the sandbox environment, until you feel ready to move on to production.
Entity IDs will vary from the ones in Production environment.
All your requests should use the following domain:
https://merchant.elryan.com/api
In this environment your records will be stored permanently. Before moving on to this environment, please make sure you are comfortable and successful with the Sandbox Environment. but this time you need to have a vendor account at Elryan Production Marketplace and then you can generate your Bearer Token via Users / Generate Token service.
This endpoint allows you to generate a Bearer token for a user to use all other services.
Request Body
email (text, required): The email of the user for whom the token is to be generated.
password (text, required): The password of the user for authentication.
Response
Status: 200
Content-Type: application/json
Example Response Body:
{
"data": {
"_id": "",
"vacation": true,
"syncStatus": true,
"accountUsername": "",
"mailAddress": "",
"mobileNumber": "",
"name": "",
"password": "",
"shopBrandName": "",
"id": "",
"role": "",
"APIToken": ""
},
"error_code": 0
}
{- "email": "{{email}}",
- "password": "{{password}}"
}
Your categories with your own category tree structure. Later on you'll be matching saved categories with Elryan's category values.
This endpoint is used to search for categories.
The response of this request can be represented as a JSON schema:
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Category Id": { "type": "string" },
"Is Parent?": { "type": "string" },
"Name": { "type": "string" },
"Name (AR)": { "type": "string" },
"Name with hierarchy": { "type": "string" },
"Parent Id": { "type": "string" },
"Product Attribute Set": { "type": "string" }
}
}
},
"error_code": { "type": "number" }
}
}
{- "start": 0,
- "length": 5,
- "search": {
- "Category Id": "",
- "Parent Id": "",
- "Product Attribute Set": "",
- "Name": "",
- "Name (AR)": "",
- "Name with hierarchy": "Electronics : Mobile & Tablets : Mobile"
}
}
The endpoint retrieves the details of a specific category with the Category Id.
Method: GET
URL: {{baseUrl}}/categories/get/51
The response returned is a JSON object with the following schema:
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"remote_id": { "type": "string" },
"userId": { "type": "string" },
"created_at": { "type": "string" },
"exported": { "type": "boolean" },
"is_active": { "type": "boolean" },
"name": { "type": "string" },
"parent_id": { "type": "string" },
"remote_parent_id": { "type": "string" },
"updated_at": { "type": "string" },
"id": { "type": "string" }
}
},
"error_code": { "type": "number" }
}
}
This endpoint allows users to search for brands.
start (number) - The starting index for the search.
length (number) - The number of items to retrieve.
search (object) - An object containing search parameters.
id (string) - The ID of the brand.
Name (string) - The name of the brand.
Name (AR) (string) - The Arabic name of the brand.
The response is a JSON array containing brand objects with the following properties:
id (string): The unique identifier of the brand.
Name (string): The name of the brand.
Name (AR) (string): The name of the brand in Arabic.
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"Name": { "type": "string" },
"Name (AR)": { "type": "string" }
}
}
},
"error_code": { "type": "number" }
}
}
{- "start": 0,
- "length": 100,
- "search": {
- "id": "",
- "Name": "apple",
- "Name (AR)": ""
}
}
An HTTP GET request is made to {{baseUrl}}/brands/get/Apple
to fetch details about the brand.
The response will be in JSON format and will include the following fields:
data (object)
id (string): The unique identifier of the brand.
Name (string): The name of the brand.
Name (AR) (string): The name of the brand in Arabic.
error_code (integer): The error code associated with the response.
This endpoint allows users to search for colours.
start (number) - The starting index for the search.
length (number) - The number of items to retrieve.
search (object) - An object containing search parameters.
id (string) - The ID of the colour.
Name (string) - The name of the colour.
Name (AR) (string) - The Arabic name of the colour.
The response is a JSON array containing colour objects with the following properties:
id (string): The unique identifier of the colour.
Name (string): The name of the colour.
Name (AR) (string): The name of the colour in Arabic.
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"Name": { "type": "string" },
"Name (AR)": { "type": "string" }
}
}
},
"error_code": { "type": "number" }
}
}
{- "start": 0,
- "length": 100,
- "search": {
- "id": "",
- "Name": "Gray",
- "Name (AR)": ""
}
}
An HTTP GET request is made to {{baseUrl}}/brands/get/Gray
to fetch details about the colour.
The response will be in JSON format and will include the following fields:
data (object)
id (string): The unique identifier of the colour.
Name (string): The name of the colour.
Name (AR) (string): The name of the colour in Arabic.
error_code (integer): The error code associated with the response.
The GET /attributes/get/235
endpoint is used to retrieve attribute data for a specific attribute with the ID 235
.
The response is in JSON format and follows the schema below:
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"Attribute ID": {"type": "string"},
"Name": {"type": "string"},
"Name (AR)": {"type": "string"},
"Attribute Code": {"type": "string"},
"Input": {"type": "string"},
"Mandatory?": {"type": "string"},
"options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {"type": "string"},
"Name": {"type": "string"},
"Name (AR)": {"type": "string"}
}
}
}
}
},
"error_code": {"type": "integer"}
}
}
The request body should be in JSON format and include the following parameters:
Item Brand
(string): The brand of the product.
SKU
(string): The Stock Keeping Unit (SKU) of the product.
Colour
(string): The color of the product.
Depth (mm)
(string): The depth of the product in millimeters.
Height (mm)
(string): The height of the product in millimeters.
Category with hierarchy
(string): The category hierarchy of the product.
quantityAvailable
(string): The available quantity of the product.
stockStatus
(string): The stock status of the product, Available options 'In Stock', 'Out of Stock'.
Product Name
(string): The name of the product.
Product Name (AR)
(string): The Arabic name of the product.
Width (mm)
(string): The width of the product in millimeters.
productFeatures
(object): The features of the product.
productDescription
(string): The description of the product.
productDescriptionAr
(string): The Arabic description of the product.
warrantyPeriod
(string): The warranty period of the product.
warrantyProvider
(string): The provider of the warranty.
warrantyProvided
(boolean): Indicates if warranty is provided.
warrantyProviderContact
(string): The contact information of the warranty provider.
returnPolicy
(string): The return policy of the product.
pickUpTime
(string): The pick-up time for the product.
price
(string): The price of the product.
productImage
(array): The image URLs of the product.
special_price
(string): The special price of the product.
promotionalDate
(object): The promotional date range for the product.
The response body is in JSON format and includes the following parameters:
data
(object): The data object containing the details of the product.
error_code
(number): The error code, if any, for the response.
{- "Item Brand": "No Brand",
- "SKU": "sh-115",
- "Colour": "Colorful",
- "Depth (mm)": "7",
- "Height (mm)": "2",
- "Category with hierarchy": "Beauty & Fragrance : Skin Care : Face : Serums and Toners",
- "quantityAvailable": "2",
- "stockStatus": "In Stock",
- "Product Name": "sdfsdf",
- "Product Name (AR)": "asdfasdf",
- "Width (mm)": "17",
- "productFeatures": { },
- "productDescription": "asdasd",
- "productDescriptionAr": "asdfasdf",
- "warrantyPeriod": "",
- "warrantyProvider": "",
- "warrantyProvided": false,
- "warrantyProviderContact": "",
- "returnPolicy": "Returns allowed within 3 days",
- "pickUpTime": "1",
- "price": "10000",
- "special_price": "9000",
- "promotionalDate": {
- "fromDate": "10/14/2024",
- "toDate": "10/31/2024"
}
}
This endpoint is used to search for products based on various search parameters.
search (object) - An object containing search parameters.
SKU (string) - The SKU (Stock Keeping Unit) of the product.
Product Title (string) - The title of the product.
Product Title (AR) (string) - The Arabic title of the product.
Item Brand (string) - The brand of the product.
Item Brand (AR) (string) - The Arabic brand of the product.
approvalStatus (string) - The approval status of the product.
page (number) - The page number for the search results.
Upon a successful execution, the endpoint returns a JSON object with the following structure:
{
"data": {
"products": [
{
"digital": true,
"Item Brand": "",
"SKU": "",
"Product Title (AR)": "",
"Product Title": "",
"Depth (mm)": "",
"Height (mm)": "",
"Magento Category Primary": "",
"quantityAvailable": "",
"stockStatus": "",
"Width (mm)": "",
"Magento Product Description (AR)": "",
"warrantyProvided": true,
"returnPolicy": "",
"pickUpTime": "",
"Current Lowest Price on Sale": 0,
"elryanSellingPrice": "",
"elryanIQDSellingPrice": "",
"vendorNetPrice": "",
"Magento Category Primary Hierarchy": [""],
"productImage": [
{
"fileName": "",
"fileUrl": ""
}
],
"Product Name": "",
"Product Name (AR)": "",
"approvalStatus": "",
"Marketplace Commission": "",
"productDescription": "",
"createdTime": "",
"lastModified": "",
"userId": "",
"selectedCurrency": "",
"id": ""
}
],
"page": 0,
"itemsPerPage": 0,
"total": 0
},
"error_code": 0
}
The response contains an array of products with various details such as digital status, brand, SKU, titles, dimensions, quantity available, stock status, prices, images, and more. The "error_code" field indicates the status of the response.
{- "search": {
- "SKU": "LED43A11SAFFS",
- "Product Title": "",
- "Product Title (AR)": "",
- "Item Brand": "",
- "Item Brand (AR)": "",
- "approvalStatus": ""
}, - "page": 1
}
This endpoint retrieves product information based on the provided SKU (Stock Keeping Unit).
This is a GET request and does not require a request body.
data
(object): Contains the product information.
digital
(boolean): Indicates if the product is digital.
Item Brand
(string): The brand of the item.
SKU
(string): The Stock Keeping Unit of the product.
Product Title (AR)
(string): The product title in Arabic.
Product Title
(string): The product title.
Depth (mm)
(string): The depth of the product in millimeters.
Height (mm)
(string): The height of the product in millimeters.
Magento Category Primary
(string): The primary category in Magento.
quantityAvailable
(string): The available quantity of the product.
stockStatus
(string): The stock status of the product.
Width (mm)
(string): The width of the product in millimeters.
Magento Product Description (AR)
(string): The product description in Arabic from Magento.
warrantyProvided
(boolean): Indicates if warranty is provided for the product.
returnPolicy
(string): The return policy for the product.
pickUpTime
(string): The pick up time for the product.
Current Lowest Price on Sale
(number): The current lowest price of the product on sale.
elryanSellingPrice
(string): The selling price of the product.
elryanIQDSellingPrice
(string): The selling price of the product in IQD.
vendorNetPrice
(string): The net price of the vendor.
Magento Category Primary Hierarchy
(array): The hierarchy of primary categories in Magento.
productImage
(array): Array of product images.
fileName
(string): The name of the image file.
fileUrl
(string): The URL of the image file.
Product Name
(string): The name of the product.
Product Name (AR)
(string): The name of the product in Arabic.
approvalStatus
(string): The approval status of the product.
Marketplace Commission
(string): The commission in the marketplace.
productDescription
(string): The description of the product.
createdTime
(string): The timestamp when the product was created.
lastModified
(string): The timestamp when the product was last modified.
userId
(string): The ID of the user associated with the product.
selectedCurrency
(string): The selected currency for the product.
id
(string): The ID of the product.
error_code
(number): The error code, if any.
The endpoint retrieves product information.
{
"data": {
"products": [
{
"approvalStatus": "",
"Colour": "",
"productDescription": "",
"productDescriptionAr": "",
"SKU": "",
"Current Lowest Price on Sale": "",
"Depth (mm)": "",
"Height (mm)": "",
"Item Brand": "",
"Magento Category Primary": "",
"Magento Category Primary Hierarchy": [""],
"Magento Product Description": "",
"Magento Product Description (AR)": "",
"Marketplace Commission": "",
"Product Name": "",
"Product Name (AR)": "",
"Product Title": "",
"Product Title (AR)": "",
"Width (mm)": "",
"createdTime": "",
"elryanSellingPrice": "",
"lastModified": "",
"pickUpTime": "",
"productCategoryArabic": "",
"productImage": [
{
"fileName": "",
"fileUrl": ""
}
],
"quantityAvailable": "",
"returnPolicy": "",
"selectedCurrency": "",
"stockStatus": "",
"userId": "",
"vendorNetPrice": "",
"warrantyProvided": true,
"id": ""
}
],
"total": 0
},
"error_code": 0
}
The response contains an object data
which includes an array of products
error_code
(number): The error code, if any.This endpoint allows you to update the stock prices of a product.
SKU
(string) (Required): The product's SKU.
quantityAvailable
(string): The quantity of the product available in stock.
stockStatus
(string): The status of the product's stock.
price
(string): The regular price of the product.
special_price
(string): The special price of the product.
promotionalDate
(object): The promotional date range for the product, with fromDate
and toDate
fields.
Upon a successful execution, the response will include a JSON object with the updated data for the product, including various product details, stock information, and pricing. The data
field contains the updated product information, while the error_code
field indicates the status of the operation.
Example:
{
"data": {
"SKU": "",
"userId": "",
"Colour": "",
"Depth (mm)": "",
"Height (mm)": "",
"Item Brand": "",
"Magento Category Primary Hierarchy": [""],
...
"id": ""
},
"error_code": 0
}
{- "SKU": "sh-115",
- "quantityAvailable": "0",
- "stockStatus": "In Stock",
- "price": "10000",
- "special_price": "9000",
- "promotionalDate": {
- "fromDate": "10/15/2024",
- "toDate": "10/31/2024"
}
}
This endpoint retrieves details of a specific order by providing the POlineID in the URL. The response will include various order-related information in JSON format, such as purchase order details, item description, quantity, status, and financial details. The response will also include an error code if applicable.
The last execution of this request returned a 200 status code with a JSON response containing order data and an error code.
Response example:
{
"data": {
"POlineID": "77231331",
"Date": "11/09/2022",
"Description": "Night Bloom by Jacomo for Women - Eau de Parfum, 100ml",
"Description (AR)": "نايت بلوم من جاكومو للنساء - او دي بارفان, 100 مل",
"Elryan Commission": "10.0%",
"Item": "3392865241177-62e67b59a77546efcb592795",
"Net Amount": "22.50",
"Order Number": "PO110038645",
"POLastModified": "12/09/2022 11:38 PM",
"Purchase Order ID": "7723133",
"Quantity": "1",
"Selling Price": "25",
"Status": "Delivered",
"Status (AR)": "تم التوصيل",
"Total Amount": "25.00",
"dateISO": "2022-09-11T00:00:00",
"id": "631e4485e081fc4a978a8598",
"recordType": "salesorder",
"userId": "62e67b59a77546efcb592795",
"exported": true,
"updatedLocalTime": "2022-09-12T01:38:58.000Z",
"updatedTime": "2022-09-11T22:38:58.184Z",
"Magento IQD Exchange Rate": "1485"
},
"error_code": 0
}
This endpoint is used to retrieve a list of unfulfilled orders.
Upon a successful execution, the response will contain a status code of 200 and a JSON object with the list of unfulfilled orders under the "data" key. Each order object includes various details such as POlineID, Date, Description, Elryan Commission, Item, Net Amount, Order Number, and more. The "error_code" field will be set to 0 in case of success.
Response example:
{
"data": [
{
"POlineID": "77231332",
"Date": "11/09/2022",
"Description": "Jacomo For Her by Jacomo for Women - Eau de Parfum, 100ml",
"Description (AR)": "جاكومو فور هير من جاكومو للنساء - او دي بارفان, 100 مل",
"Elryan Commission": "10.0%",
"Item": "3392865191175-62e67b59a77546efcb592795",
"Net Amount": "45.00",
"Order Number": "PO110038645",
"POLastModified": "12/09/2022 11:38 PM",
"Purchase Order ID": "7723133",
"Quantity": "2",
"Selling Price": "25",
"Status": "Pending Confirmation",
"Status (AR)": "تم التوصيل",
"Total Amount": "50.00",
"dateISO": "2022-09-11T00:00:00",
"id": "631e4485e081fc4a978a859a",
"recordType": "salesorder",
"userId": "62e67b59a77546efcb592795",
"exported": true,
"updatedLocalTime": "2022-09-12T01:38:58.000Z",
"updatedTime": "2022-09-11T22:38:58.184Z",
"Magento IQD Exchange Rate": "1485"
}
],
"error_code": 0
}
{- "start": 0,
- "length": 10
}
This HTTP PUT request is used to reject a specific order identified by the order POlineID. The request should be sent to {{baseUrl}}/orders/cancel/:POlineID with a payload in raw JSON format. The payload should include the "reason" key with the reason for cancellation as its value.
Upon successful execution, the response will have a status code of 200 and a JSON content type. The response body will contain the updated data for the canceled order, including various order details such as POlineID, Date, Description, Elryan Commission, Item, Net Amount, Order Number, Quantity, Selling Price, Status, Total Amount, and more. Additionally, the response will include an error_code indicating the success of the operation.
Example:
{
"data": {
"POlineID": "",
"Date": "",
"Description": "",
"Description (AR)": "",
"Elryan Commission": "",
"Item": "",
"Net Amount": "",
"Order Number": "",
"POLastModified": "",
"Purchase Order ID": "",
"Quantity": "",
"Selling Price": "",
"Status": "",
"Status (AR)": "",
"Total Amount": "",
"dateISO": "",
"id": "",
"recordType": "",
"userId": "",
"exported": true,
"updatedLocalTime": "",
"updatedTime": "",
"Magento IQD Exchange Rate": "",
"cancelReason": ""
},
"error_code": 0
}
{- "reason": "out_of_stock"
}
This endpoint makes an HTTP GET request to retrieve a list of order reasons cancellation reasons from the server. The response will be in JSON format and will include an array of order reasons under the "data" key.
Response:
{
"data": [
"out_of_stock",
"incorrect_pricing",
"sourcing_delay"
],
"error_code": 0
}
This endpoint is used to search for transactions based on certain criteria.
start
(integer) - The starting index for the search results.length
(integer) - The number of results to return.search
(object)recordType
(string) - The type of record to search for. Possible values are 'vendorcredit', 'vendorbill', 'vendorpayment'.Example:
{
"start": 0,
"length": 10,
"search": {
"recordType": "vendorcredit"
}
}
data
(array) - An array of transaction objects containing details such as amount, date, transaction number, type, record type, user ID, and Magento IQD exchange rate._id
(string) - The ID of the transaction.id
(string) - The transaction ID.Amount
(string) - The amount of the transaction.Date
(string) - The date of the transaction.Transaction Number
(string) - The transaction number.Type
(string) - The type of the transaction.Type (AR)
(string) - Another type related to the transaction.recordType
(string) - The record type of the transaction.userId
(string) - The ID of the user associated with the transaction.Magento IQD Exchange Rate
(string) - The exchange rate in Magento IQD.error_code
(integer) - An error code, if any.Example Response:
{
"data": [
{
"_id": "",
"id": "",
"Amount": "",
"Date": "",
"Transaction Number": "",
"Type": "",
"Type (AR)": "",
"recordType": "",
"userId": "",
"Magento IQD Exchange Rate": ""
}
],
"error_code": 0
}
{- "start": 0,
- "length": 10,
- "search": {
- "recordType": "vendorcredit"
}
}
This endpoint retrieves the details of a specific transaction with the ID 3364306. The response will be in JSON format and will include the transaction data such as amount, date, transaction number, type, record type, user ID, and Magento IQD exchange rate. The response will also contain an error code if applicable.
Example:
{
"data": {
"_id": "61abdb0ce081fc4a975c296c",
"id": "3364306",
"Amount": "46.00",
"Date": "04/12/2021",
"Transaction Number": "PO110012710",
"Type": "Sales",
"Type (AR)": "مبيعات",
"recordType": "vendorbill",
"userId": "62e67b59a77546efcb592795",
"Magento IQD Exchange Rate": "1480"
},
"error_code": 0
}
The endpoint {{baseUrl}}/packages/search
is a POST request used to search for packages. The request should include a payload with the following structure in raw request body type:
{
"start": 0,
"length": 0,
"search": {
"supplier_id": null,
"order_id": 0,
"id": null,
"marketplace_package_id": null,
"remote_id": null,
"status": null,
"package_status": null
}
}
The response to this request is a JSON object with the following schema:
{
"data": [
{
"order_id": 0,
"company_id": 0,
"created_at": "",
"invoice": {
"invoice_pdf": "",
"invoice_link": "",
"invoice_date": "",
"invoice_number": ""
},
"items": [
{
"order_item_id": 0,
"quantity": 0,
"total_deci": 0
}
],
"marketplace_package_id": 0,
"remote_id": "",
"remote_supplier_id": 0,
"status": "",
"supplier_id": 0,
"total_deci": 0,
"tracking": {
"tracking_provider": "",
"provider": ""
},
"updated_at": "",
"id": ""
}
],
"error_code": 0
}
{- "start": 0,
- "length": 10,
- "search": {
- "supplier_id": null,
- "order_id": 13,
- "id": null,
- "marketplace_package_id": null,
- "remote_id": null,
- "status": null,
- "package_status": null
}
}
Once you are ready to send your products, you need to start with creating package information with the related items by this service.
This endpoint allows you to create a new package by making an HTTP POST request to the specified URL.
remote_supplier_id
(integer): The ID of the remote supplier.supplier_id
(integer): The ID of the supplier.order_id
(integer): The ID of the order.company_id
(integer): The ID of the company.remote_id
(string): The remote package ID.marketplace_package_id
(integer): The ID of the marketplace package.total_deci
(integer): The total decimal value.status
(string): The status of the package.items
(array): An array of items included in the package, each containing:order_item_id
(integer): The ID of the order item.quantity
(integer): The quantity of the item.total_deci
(integer): The total decimal value of the item.tracking
(object): Object containing tracking information with the following fields:tracking_pdf
(string): The tracking PDF file.tracking_barcode
(string): The tracking barcode.base64_file
(string): The base64 encoded file.tracking_link
(string): The tracking link.tracking_provider
(string): The tracking provider (deprecated).provider
(string): The provider.invoice
(object): Object containing invoice information with the following fields:invoice_pdf
(string): The invoice PDF file.invoice_link
(string): The invoice link.invoice_date
(string): The date of the invoice.invoice_number
(string): The invoice number.The response will contain the created package data, including the package ID, order ID, company ID, creation and update timestamps, invoice information, item details, marketplace package ID, remote ID, supplier ID, total decimal value, and tracking information. Additionally, an error code will be included in the response.
Example:
{
"data": {
"order_id": 0,
"company_id": 0,
"created_at": "",
"invoice": {
"invoice_pdf": "",
"invoice_link": "",
"invoice_date": "",
"invoice_number": ""
},
"items": [
{
"order_item_id": 0,
"quantity": 0,
"total_deci": 0
}
],
"marketplace_package_id": 0,
"remote_id": "",
"remote_supplier_id": 0,
"status": "",
"supplier_id": 0,
"total_deci": 0,
"tracking": {
"tracking_pdf": "",
"tracking_barcode": "",
"base64_file": "",
"tracking_link": "",
"tracking_provider": "",
"provider": ""
},
"updated_at": "",
"id": ""
},
"error_code": 0
}
{- "remote_supplier_id": 13,
- "supplier_id": 13,
- "order_id": 13,
- "company_id": 3,
- "remote_id": "remote_package_3",
- "marketplace_package_id": 3,
- "total_deci": 3,
- "status": "null",
- "items": [
- {
- "order_item_id": 2,
- "quantity": 1,
- "total_deci": 3
}
], - "tracking": {
- "tracking_pdf": "null",
- "tracking_barcode": "null",
- "base64_file": "null",
- "tracking_link": "null",
- "tracking_provider": "null",
- "provider": "null"
}, - "invoice": {
- "invoice_pdf": "null",
- "invoice_date": "2021-12-29",
- "invoice_number": "18244124758"
}
}
This endpoint retrieves package details based on the provided package ID.
No request body is required for this endpoint.
The response will be a JSON object with the following schema:
{
"data": {
"order_id": 0,
"company_id": 0,
"created_at": "",
"invoice": {
"invoice_pdf": "",
"invoice_link": "",
"invoice_date": "",
"invoice_number": ""
},
"items": [
{
"order_item_id": 0,
"quantity": 0,
"total_deci": 0
}
],
"marketplace_package_id": 0,
"remote_id": "",
"remote_supplier_id": 0,
"status": "",
"supplier_id": 0,
"total_deci": 0,
"tracking": {
"tracking_pdf": "",
"tracking_barcode": "",
"base64_file": "",
"tracking_link": "",
"tracking_provider": "",
"provider": ""
},
"updated_at": "",
"id": ""
},
"error_code": 0
}
The endpoint makes an HTTP GET request to cancel a package by ID
The response of the request can be documented as a JSON schema as follows:
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"order_id": { "type": "integer" },
"company_id": { "type": "integer" },
"created_at": { "type": "string" },
"invoice": {
"type": "object",
"properties": {
"invoice_pdf": { "type": "string" },
"invoice_link": { "type": "string" },
"invoice_date": { "type": "string" },
"invoice_number": { "type": "string" }
}
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"order_item_id": { "type": "integer" },
"quantity": { "type": "integer" },
"total_deci": { "type": "integer" }
}
}
},
"marketplace_package_id": { "type": "integer" },
"remote_id": { "type": "string" },
"remote_supplier_id": { "type": "integer" },
"status": { "type": "string" },
"supplier_id": { "type": "integer" },
"total_deci": { "type": "integer" },
"tracking": {
"type": "object",
"properties": {
"tracking_pdf": { "type": "string" },
"tracking_barcode": { "type": "string" },
"base64_file": { "type": "string" },
"tracking_link": { "type": "string" },
"tracking_provider": { "type": "string" },
"provider": { "type": "string" }
}
},
"updated_at": { "type": "string" },
"id": { "type": "string" }
}
},
"error_code": { "type": "integer" }
}
}
You can include tracking information to you packages with this service, if you didn't do in creation phase.
tracking_pdf
(string): The URL for the tracking PDF.tracking_barcode
(string): The tracking barcode.base64_file
(string, optional): Base64 encoded file.tracking_link
(string): The URL for tracking.tracking_provider
(string, deprecated): The tracking provider (deprecated).provider
(string): The provider.{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"order_id": {
"type": "integer"
},
"company_id": {
"type": "integer"
},
"created_at": {
"type": "string"
},
"invoice": {
"type": "object",
"properties": {
"invoice_pdf": {
"type": "string"
},
"invoice_link": {
"type": "string"
},
"invoice_date": {
"type": "string"
},
"invoice_number": {
"type": "string"
}
}
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"order_item_id": {
"type": "integer"
},
"quantity": {
"type": "integer"
},
"total_deci": {
"type": "integer"
}
}
}
},
"marketplace_package_id": {
"type": "integer"
},
"remote_id": {
"type": "string"
},
"remote_supplier_id": {
"type": "integer"
},
"status": {
"type": "string"
},
"supplier_id": {
"type": "integer"
},
"total_deci": {
"type": "integer"
},
"tracking": {
"type": "object",
"properties": {
"tracking_pdf": {
"type": "string"
},
"tracking_barcode": {
"type": "string"
},
"base64_file": {
"type": "string"
},
"tracking_link": {
"type": "string"
},
"tracking_provider": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"updated_at": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"error_code": {
"type": "integer"
}
}
}
{- "tracking_barcode": "12312412412",
- "base64_file": null,
- "tracking_provider": "pts",
- "provider": "pts"
}
Fulfills an order via one of our accepted shipping providers that offer online shipping.
tracking_provider
(deprecated): The tracking provider for the package. (Will be deprecated)provider
: The provider for the package.Upon successful execution, the endpoint returns a JSON response with the following structure:
{
"data": {
"order_id": 0,
"company_id": 0,
"created_at": "",
"invoice": {
"invoice_pdf": "",
"invoice_link": "",
"invoice_date": "",
"invoice_number": ""
},
"items": [
{
"order_item_id": 0,
"quantity": 0,
"total_deci": 0
}
],
"marketplace_package_id": 0,
"remote_id": "",
"remote_supplier_id": 0,
"status": "",
"supplier_id": 0,
"total_deci": 0,
"tracking": {
"tracking_provider": "",
"provider": ""
},
"updated_at": "",
"id": ""
},
"error_code": 0
}
order_id
: The ID of the order associated with the package.company_id
: The ID of the company associated with the package.created_at
: The timestamp of creation.invoice
: Details of the invoice including PDF, link, date, and number.items
: List of items in the package with order item ID, quantity, and total.marketplace_package_id
: The ID of the package in the marketplace.remote_id
: The remote ID of the package.remote_supplier_id
: The ID of the remote supplier.status
: The status of the package.supplier_id
: The ID of the supplier.total_deci
: The total decimal value.tracking
: Details of the tracking provider and provider.updated_at
: The timestamp of the last update.id
: The ID of the package.{- "tracking_provider": "pts",
- "provider": "pts"
}
{- "id": 10,
- "package_id": 645345,
- "company_id": 34325,
- "tracking_barcode": "12312412412",
- "base64_file": "null",
- "tracking_provider": "pts",
- "provider": "pts",
- "is_default": false,
- "is_tracking": false,
- "delivery_info": "null",
- "delivery_info_provider": "null",
- "delivery_state": "null"
}
This endpoint retrieves the details of a specific delivery by providing the delivery ID in the URL.
{{baseUrl}}/deliveries/1/
{- "delivery_info": {
- "datetime": "2021-01-01 00:00:00",
- "status": "delivered",
- "detail": "the shipment has been successfully delivered",
- "location": "turkey"
}
}
This endpoint is used to initiate a cron job.
No request body is required for this request.
The response for this request is a JSON object with the following schema:
{
"data": {
"message": "string"
},
"error_code": "number",
"message": "string"
}
data
(object)
message
(string): A message related to the response.error_code
(number): An error code, if any.
message
(string): A message related to the response.
The response received upon the last execution had a status code of 200 and a content type of application/json. The response body included a JSON object with a "data" field containing the "message" key, an "error_code" field, and a "message" field.