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.
raw (application/json)
{
"start": 0,
"length": 0,
"search": {
"id": null,
"company_id": null,
"parent_id": null,
"name": "",
"remote_id": null,
"is_active": null,
"remote_parent_id": null
}
}
The response of this request can be represented as a JSON schema:
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"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" }
}
}
{- "start": 0,
- "length": 5,
- "search": {
- "id": null,
- "company_id": null,
- "parent_id": null,
- "name": "Bags5",
- "remote_id": null,
- "is_active": null,
- "remote_parent_id": null
}
}
This endpoint is used to upsert (update or insert) a category.
parent_id
(string, optional): The ID of the parent category.name
(string, optional): The name of the category.remote_id
(string, optional): The remote ID of the category.remote_parent_id
(string, optional): The remote ID of the parent category.is_active
(boolean, required): Indicates if the category is active.The response is in the form of a JSON 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"}
}
}
{- "parent_id": "null",
- "name": "Bags5",
- "remote_id": "bags_555",
- "remote_parent_id": "null",
- "is_active": true
}
The endpoint retrieves the details of a specific category with the remote_id "bags_555".
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.
The response is a JSON array containing brand objects with the following properties:
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"remote_id": { "type": "string" },
"userId": { "type": "string" },
"created_at": { "type": "string" },
"exported": { "type": "boolean" },
"is_active": { "type": "boolean" },
"name": { "type": "string" },
"remote_image_url": { "type": "string" },
"updated_at": { "type": "string" },
"id": { "type": "string" }
}
}
},
"error_code": { "type": "number" }
}
}
{- "start": 0,
- "length": 1,
- "search": {
- "remote_id": null,
- "name": null,
- "is_active": "true",
- "id": null
}
}
The POST /brands/upsert
endpoint is used to create or update a brand. The request should include a JSON payload with the brand details such as name, remote ID, remote image URL, and whether the brand is active.
name
(string, required): The name of the brand.remote_id
(string, required): The remote ID of the brand.remote_image_url
(string, optional): The URL of the remote image associated with the brand.is_active
(boolean, required): Indicates whether the brand is active.The response of this request is a JSON schema representing the structure of the brand object.
Example response:
{
"data": {
"remote_id": "apple_9",
"userId": "6630c317826ae800363d051e",
"created_at": "2024-04-30T21:32:42.453Z",
"exported": false,
"is_active": true,
"name": "Apple_9",
"remote_image_url": "updatdsfdsafe_9.jpg",
"updated_at": "2024-04-30T21:32:42.453Z",
"id": "6631637a5fa475f8a54403f6"
},
"error_code": 0
}
{- "name": "Apple_9",
- "remote_id": "apple_9",
- "remote_image_url": "updatdsfdsafe_9.jpg",
- "is_active": true
}
This endpoint makes an HTTP GET request to retrieve information about the brand with the remote_id "apple_9".
The response will be in JSON format and will include the following fields:
This endpoint allows users to search for attributes.
The response is in JSON format and follows the schema below:
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"remote_id": { "type": "string" },
"userId": { "type": "string" },
"created_at": { "type": "string" },
"exported": { "type": "boolean" },
"is_active": { "type": "boolean" },
"name": { "type": "string" },
"updated_at": { "type": "string" },
"id": { "type": "string" }
}
}
},
"error_code": { "type": "number" }
}
}
{- "start": 0,
- "length": 10,
- "search": {
- "company_id": null,
- "remote_id": null,
- "name": null,
- "is_active": null,
- "id": null
}
}
The POST
request is used to upsert attributes at the specified endpoint {{baseUrl}}/attributes/upsert
. The request should contain a JSON payload with parameters name
, remote_id
, and is_active
.
name
(string, required): The name of the attribute.remote_id
(string, required): The remote ID of the attribute.is_active
(boolean, required): Indicates whether the attribute is active.The response is in the form of a JSON 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"},
"updated_at": {"type": "string"},
"id": {"type": "string"}
}
},
"error_code": {"type": "integer"}
}
}
{- "name": "Size1",
- "remote_id": "size_123456789",
- "is_active": true
}
The GET /attributes/get/size_123456789
endpoint retrieves attribute data for a specific size with the ID 123456789
. The response is in JSON format and has 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"},
"updated_at": {"type": "string"},
"id": {"type": "string"}
}
},
"error_code": {"type": "integer"}
}
}
This endpoint allows you to search for attribute values.
{
"start": 0,
"length": 0,
"search": {
"value": null,
"is_active": null,
"id": null,
"remote_id": null,
"attribute_id": null,
"remote_attribute_id": null
}
}
The response is a JSON object with the following schema:
{
"data": [
{
"remote_id": "",
"userId": "",
"attribute": {
"name": "",
"remote_id": "",
"is_active": true
},
"created_at": "",
"exported": true,
"is_active": true,
"updated_at": "",
"value": "",
"id": ""
}
],
"error_code": 0
}
The response contains an array of data objects, each representing an attribute value, along with an error code.
{- "start": 0,
- "length": 10,
- "search": {
- "value": null,
- "is_active": null,
- "id": null,
- "remote_id": null,
- "attribute_id": null,
- "remote_attribute_id": null
}
}
This endpoint allows the client to upsert attribute values.
The response will be in the form of a JSON schema with the following structure:
{
"data": {
"remote_id": "",
"userId": "",
"attribute": {
"name": "",
"remote_id": "",
"is_active": true
},
"created_at": "",
"exported": true,
"is_active": true,
"updated_at": "",
"value": "",
"id": ""
},
"error_code": 0
}
{- "value": "44",
- "is_active": true,
- "remote_id": "remote_44",
- "attribute": {
- "name": "Size",
- "remote_id": "size_123",
- "is_active": true
}
}
This endpoint retrieves attribute values for a specific remote device with the remote_id "remote_44".
The request does not require any specific parameters in the request body or headers.
Upon a successful request (Status: 200), the response will be in JSON format and will include the following fields:
data
: An object containing information about the attribute values, including the remote ID, user ID, attribute details, creation and update timestamps, exported status, and value ID.error_code
: An integer representing the error code (0 indicates no error).Example response body:
{
"data": {
"remote_id": "",
"userId": "",
"attribute": {
"name": "",
"remote_id": "",
"is_active": true
},
"created_at": "",
"exported": true,
"is_active": true,
"updated_at": "",
"value": "",
"id": ""
},
"error_code": 0
}
This endpoint is used to create or update a product.
name
(string, required): The name of the product.
spu
(string, required): The Stock Keeping Unit (SKU) of the product.
category
(object, required): The category information of the product.
parent_remote_id
(string, required): The parent category's remote ID.
remote_id
(string, required): The category's remote ID.
name
(string, required): The name of the category.
brand
(object, required): The brand information of the product.
name
(string, required): The name of the brand.
remote_id
(string, required): The brand's remote ID.
default_image_url
(string, required): The URL of the default image of the product.
tax
(number, required): The tax amount for the product.
is_active
(boolean, required): Indicates if the product is active.
translations
(array, required): Translations for the product name in different languages.
language
(string, required): The language code.
name
(string, required): The translated name of the product.
variants
(array, required): The variants of the product.
retail_price
(number, required): The retail price of the variant.
price
(number, required): The price of the variant.
currency
(string, required): The currency of the price.
stock
(number, required): The stock quantity of the variant.
name
(string, required): The name of the variant.
sku
(string, required): The Stock Keeping Unit (SKU) of the variant.
barcode
(string, required): The barcode of the variant.
hs_code
(string, required): The Harmonized System (HS) code of the variant.
gtin
(string, required): The Global Trade Item Number (GTIN) of the variant.
default_image_url
(string, required): The URL of the default image of the variant.
extra_images
(array, required): Additional images of the variant.
description
(string, required): The description of the variant.
weight
(number, required): The weight of the variant.
height
(number, required): The height of the variant.
width
(number, required): The width of the variant.
length
(number, required): The length of the variant.
freight
(number, required): The freight cost of the variant.
is_active
(boolean, required): Indicates if the variant is active.
supplier
(object, required): The supplier information of the variant.
name
(string, required): The name of the supplier.
remote_id
(string, required): The supplier's remote ID.
translations
(array, required): Translations for the variant name and description in different languages.
language
(string, required): The language code.
name
(string, required): The translated name of the variant.
description
(string, required): The translated description of the variant.
attributes
(array, required): The attributes of the variant.
name
(string, required): The name of the attribute.
value
(string, required): The value of the attribute.
remote_attribute_id
(string, required): The remote ID of the attribute.
remote_attribute_value_id
(string, required): The remote ID of the attribute value.
guarantee
(number, required): The guarantee period of the product.
fulfillment_day
(number, required): The fulfillment day for the product.
{- "name": "Black Pencil",
- "spu": "black_pencil_12345677",
- "category": {
- "parent_remote_id": "null",
- "remote_id": "pencil",
- "name": "Pencil"
}, - "brand": {
- "name": "Apple",
- "remote_id": "apple1"
}, - "tax": 0,
- "is_active": true,
- "translations": [
- {
- "language": "TR",
- "name": "name change"
}, - {
- "language": "ZH",
- "name": "CN translation"
}
], - "variants": [
- {
- "retail_price": 15,
- "price": 10,
- "currency": "USD",
- "stock": 0,
- "name": "blacn pencil 123",
- "sku": "black_pencil123",
- "barcode": "123456780",
- "hs_code": "124sdjh15",
- "gtin": "12312412",
- "description": "iphone 8 description",
- "weight": 10,
- "height": 10,
- "width": 10,
- "length": 10,
- "freight": 1,
- "is_active": true,
- "supplier": {
- "name": "Supplier1",
- "remote_id": "Sup1"
}, - "translations": [
- {
- "language": "TR",
- "name": "name change",
- "description": "Desc TR"
}, - {
- "language": "ZH",
- "name": "CN translation",
- "description": "CN DEsc"
}
], - "attributes": [
- {
- "name": "Size",
- "value": "44",
- "remote_attribute_id": "size_123",
- "remote_attribute_value_id": "remote_44"
}
]
}, - {
- "retail_price": 15,
- "price": 10,
- "currency": "USD",
- "stock": 0,
- "name": "blacn pencil 123",
- "sku": "black_pencil1235",
- "barcode": "123456781",
- "hs_code": "124sdjh15",
- "gtin": "12312412",
- "description": "iphone 8 description",
- "weight": 10,
- "height": 10,
- "width": 10,
- "length": 10,
- "freight": 1,
- "is_active": true,
- "supplier": {
- "name": "Supplier1",
- "remote_id": "Sup1"
}, - "translations": [
- {
- "language": "TR",
- "name": "name change",
- "description": "Desc TR"
}, - {
- "language": "ZH",
- "name": "CN translation",
- "description": "CN DEsc"
}
], - "attributes": [
- {
- "name": "Size",
- "value": "44",
- "remote_attribute_id": "size_123",
- "remote_attribute_value_id": "remote_44"
}
]
}, - {
- "retail_price": 15,
- "price": 10,
- "currency": "USD",
- "stock": 0,
- "name": "blacn pencil 123",
- "sku": "black_pencil1235534433",
- "barcode": "123456781",
- "hs_code": "124sdjh15",
- "gtin": "12312412",
- "description": "iphone 8 description",
- "weight": 10,
- "height": 10,
- "width": 10,
- "length": 10,
- "freight": 1,
- "is_active": true,
- "supplier": {
- "name": "Supplier1",
- "remote_id": "Sup1"
}, - "translations": [
- {
- "language": "TR",
- "name": "name change",
- "description": "Desc TR"
}, - {
- "language": "ZH",
- "name": "CN translation",
- "description": "CN DEsc"
}
], - "attributes": [
- {
- "name": "Size",
- "value": "44",
- "remote_attribute_id": "size_123",
- "remote_attribute_value_id": "remote_44"
}
]
}
], - "guarantee": 6,
- "fulfillment_day": 3
}
This endpoint is used to search for products.
start (number) - The starting index for the search results.
length (number) - The number of items to retrieve.
search (object) - An object containing search parameters.
category_id (string) - The ID of the category to search within.
brand_id (string) - The ID of the brand to search within.
spu (string) - The SPU (Supplier Product Number) for the product.
name (string) - The name of the product.
is_active (boolean) - Indicates whether the product is active.
id (string) - The ID of the product.
remote_brand_id (string) - The remote ID of the brand.
remote_category_id (string) - The remote ID of the category.
{- "start": 0,
- "length": 1,
- "search": {
- "category_id": null,
- "brand_id": null,
- "spu": "black_pencil_12345677",
- "name": null,
- "is_active": null,
- "id": null,
- "remote_brand_id": null,
- "remote_category_id": null
}
}
This endpoint creates your variants connected to your product.
spu
(string): The Stock Keeping Unit (SKU) for the product variant.
retail_price
(number): The retail price of the product variant.
price
(number): The price of the product variant.
currency
(string): The currency in which the prices are specified.
stock
(number): The stock quantity of the product variant.
name
(string): The name of the product variant.
sku
(string): The Stock Keeping Unit (SKU) for the product variant.
barcode
(string): The barcode of the product variant.
hs_code
(string): The Harmonized System (HS) code for the product variant.
gtin
(string): The Global Trade Item Number (GTIN) of the product variant.
default_image_url
(string): The URL of the default image for the product variant.
extra_images
(array): Array of URLs for additional images of the product variant.
description
(string): The description of the product variant.
weight
(number): The weight of the product variant.
height
(number): The height of the product variant.
width
(number): The width of the product variant.
length
(number): The length of the product variant.
freight
(number): The freight cost of the product variant.
supplier
(object): Details of the supplier for the product variant.
name
(string): The name of the supplier.
remote_id
(string): The remote identifier of the supplier.
is_active
(boolean): Indicates whether the product variant is active.
translations
(array): Array of translations for the product variant.
language
(string): The language of the translation.
name
(string): The translated name of the product variant.
description
(string): The translated description of the product variant.
attributes
(array): Array of attributes for the product variant.
name
(string): The name of the attribute.
value
(string): The value of the attribute.
remote_attribute_id
(string): The remote identifier of the attribute.
remote_attribute_value_id
(string): The remote identifier of the attribute value.
The response body will contain the details of the created or updated product variant.
{- "spu": "white_pencil_123",
- "retail_price": 26,
- "price": 100,
- "currency": "EUR",
- "stock": 100,
- "name": "White Pencil",
- "sku": "white_pencil_test",
- "barcode": "12321412",
- "hs_code": "asdhas123",
- "gtin": "123214",
- "description": "iphone 8 description",
- "weight": 10,
- "height": 10,
- "width": 10,
- "length": 10,
- "freight": 1,
- "supplier": {
- "name": "Supplier1",
- "remote_id": "Sup1"
}, - "is_active": true,
- "translations": [
- {
- "language": "TR",
- "name": "name change test",
- "description": "DescTR"
}, - {
- "language": "ZH",
- "name": "CN translation",
- "description": "CN DEsc"
}
], - "attributes": [
- {
- "name": "Size",
- "value": "44",
- "remote_attribute_id": "size_123",
- "remote_attribute_value_id": "remote_44"
}
]
}
This endpoint allows you to search for variants based on specific criteria.
start
(number): The starting index for the search results.
length
(number): The number of results to return.
search
(object):
sku
(string): The Stock Keeping Unit of the variant.
name
(string): The name of the variant.
is_active
(boolean): Indicates if the variant is active.
id
(string): The ID of the variant.
supplier_id
(string): The ID of the supplier.
remote_supplier_id
(string): The remote ID of the supplier.
The response will be a JSON object with the following structure:
{
"data": [
{
"_id": "",
"sku": "",
"userId": "",
"__v": 0,
"attributes": [
{
"name": "",
"value": "",
"remote_attribute_id": "",
"remote_attribute_value_id": "",
"_id": ""
}
],
"barcode": "",
"currency": "",
"default_image_url": "",
"description": "",
"exported": true,
"extra_images": [""],
"freight": 0,
"gtin": "",
"height": 0,
"hs_code": "",
"is_active": true,
"length": 0,
"name": "",
"price": 0,
"retail_price": 0,
"stock": 0,
"supplier": {
"name": "",
"remote_id": ""
},
"translations": [
{
"language": "",
"name": "",
"description": "",
"_id": ""
}
],
"weight": 0,
"width": 0,
"spu": ""
}
],
"error_code": 0
}
{- "start": 0,
- "length": 10,
- "search": {
- "sku": null,
- "name": null,
- "is_active": null,
- "id": "668436368dd4c087acbcd45d",
- "supplier_id": null,
- "remote_supplier_id": null
}
}
This endpoint is used to update the stock and price of variants.
items
(array) - An array of objects containing the following parameters:sku
(string) - The SKU of the variant.
stock
(number) - The updated stock quantity of the variant.
price
(number) - The updated price of the variant.
retail_price
(number) - The updated retail price of the variant.
Example:
{
"items": [
{
"sku": "",
"stock": 0,
"price": 0,
"retail_price": 0
}
]
}
#### Response
- `data` (object) - Object containing the following parameters:
- `message` (string) - A message related to the operation.
- `updatedCount` (number) - The count of variants updated.
- `foundVariantsInDb` (array) - Array of SKUs found in the database.
- `notFoundVariantsInDb` (array) - Array of SKUs not found in the database.
- `error_code` (number) - The error code, if any.
- `message` (string) - A message related to the response.
Example:
```json
{
"data": {
"message": "",
"updatedCount": 0,
"foundVariantsInDb": [""],
"notFoundVariantsInDb": [""]
},
"error_code": 0,
"message": ""
}
{- "items": [
- {
- "sku": "black_pencil_test",
- "stock": 14,
- "price": 9.99,
- "retail_price": 29.99
}, - {
- "sku": "white_pencil_test",
- "stock": 484,
- "price": 8.59,
- "retail_price": 79.99
}
]
}
This endpoint retrieves the details of a specific variant identified by its SKU.
Method: GET
URL: {{baseUrl}}/variants/get/black_pencil123
Status: 200
Content-Type: application/json
{
"data": {
"_id": "",
"sku": "",
"userId": "",
"__v": 0,
"attributes": [
{
"name": "",
"value": "",
"remote_attribute_id": "",
"remote_attribute_value_id": "",
"_id": ""
}
],
"barcode": "",
"currency": "",
"default_image_url": "",
"description": "",
"exported": true,
"extra_images": [""],
"freight": 0,
"gtin": "",
"height": 0,
"hs_code": "",
"is_active": true,
"length": 0,
"name": "",
"price": 0,
"retail_price": 0,
"stock": 0,
"supplier": {
"name": "",
"remote_id": ""
},
"translations": [
{
"language": "",
"name": "",
"description": "",
"_id": ""
}
],
"weight": 0,
"width": 0,
"spu": ""
},
"error_code": 0
}
This endpoint enable variant with sku.
The response will be in JSON format and will have the following schema:
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"error_code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
The response will contain the following fields:
data
(object): An object containing the message related to the enablement status.
message
(string): A message related to the enablement status.error_code
(integer): An error code, if any.
message
(string): A general message related to the response.
This endpoint disable variant with sku.
The response is in JSON format and follows the schema below:
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"error_code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
The response contains the following properties:
data
: An object containing a message
property of type string.
error_code
: An integer indicating any error code.
message
: A string providing additional information about the response.
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.