Sales region
Version 1.0
Serves as the foundation for managing sales regions. Sales regions are entities representing external entities or individuals that provide products.
Sales region Entity
- Name
id
- Type
- string Required
- Description
Every sales region is assigned a unique identifier - an unsigned 64-bit integer known as the Sales region ID. This specific number is exclusive and distinct across the entire system, ensuring an unparalleled level of uniqueness.
- Name
name
- Type
- string Required
- Description
The name or label of the sales region.
- Name
created_at
- Type
- timestamp
- Description
This property indicates the time in ISO 8601 when the sales region was created.
- Name
updated_at
- Type
- timestamp
- Description
This property indicates the time in ISO 8601 when the sales region was last updated.
- Name
created_by
- Type
- foreignId
- Description
This property indicates the user who created the sales region.
- Name
updated_by
- Type
- foreignId
- Description
This property indicates the user who recently updated the sales region.
The Sales region Entity
{
"id": "123456789",
"name": "Example Sales region",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
Create a Single Sales region
This endpoint allows you to create a single sales region.
Required Fields
- Name
name
- Type
- string Required
- Description
Examples
Create a single sales region
curl --request POST \
--url https://api.example.com/v1/sales-regions \
--header 'Content-Type: application/json' \
--data '{
"name": "Example Sales region",
}'
Create a single sales region
curl --request POST \
--url https://api.example.com/v1/sales-regions \
--header 'Content-Type: application/json' \
--data '{
"name": "Example Sales region",
}'
{
"id": "123456789",
"name": "Example Sales region",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
Retrieve all Sales regions
This endpoint allows you to retrieve all sales regions.
Examples
Retrieve all sales regions
curl --request GET \
--url https://api.example.com/v1/sales-regions
Retrieve all sales regions
curl --request GET \
--url https://api.example.com/v1/sales-regions
[
{
"id": "123456789",
"name": "Example Sales region",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
},
{
"id": "987654321",
"name": "Example Sales region 2",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
]
Retrieve a Single Sales region
This endpoint allows you to retrieve a single sales region.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Retrieve a single sales region
curl --request GET \
--url https://api.example.com/v1/sales-regions/123456789
Retrieve a single sales region
curl --request GET \
--url https://api.example.com/v1/sales-regions/123456789
{
"id": "123456789",
"name": "Example Sales region",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
Update a Single Sales region
This endpoint allows you to update a single sales region.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Update a single sales region
curl --request PATCH \
--url https://api.example.com/v1/sales-regions/123456789 \
--header 'Content-Type: application/json' \
--data '{
"name": "New Sales region Name",
}'
Update a single sales region
curl --request PATCH \
--url https://api.example.com/v1/sales-regions/123456789 \
--header 'Content-Type: application/json' \
--data '{
"name": "New Sales region Name",
}'
{
"id": "123456789",
"name": "New Sales region Name",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
Delete a Single Sales region
This endpoint allows you to delete a single sales region.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Delete a single sales region
curl --request DELETE \
--url https://api.example.com/v1/sales-regions/123456789
Delete a single sales region
curl --request DELETE \
--url https://api.qooly.io/v1/sales-regions/123456789
{}
Retrieve all Products in a Sales region
This endpoint allows you to retrieve all products in a sales region. It returns an array of Product Entity.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Retrieve all products in a sales region
curl --request GET \
--url https://api.qooly.io/v1/sales-regions/123456789/products
Retrieve all products in a sales region
curl --request GET \
--url https://api.qooly.io/v1/sales-regions/123456789/products
[
{
"id": "123456789",
"brand_id": "987654321",
"metadata_id": "456789012",
"image_id": "789012345",
"is_tangible": true,
"has_details": false,
"has_pricing": false,
"is_organized": true,
"is_published": false,
"needs_review": true,
"out_of_sync": false,
"syncing_paused_at": null,
"status": "DRAFT",
"name": "Sample Product",
"model_type": "Simple",
"product_code": "ABC123",
"product_category": "Electronics",
"product_type": "Gadget",
"product_lifecycle_status": "Active",
"weight": "1.5",
"weight_unit": "kg",
"size_unit": "cm",
"length": "10",
"width": "5",
"height": "15",
"country_of_origin": "US",
"commodity_description": "A high-quality electronic gadget.",
"taxable": false,
"tax_code": "TAX123",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "789012345",
"updated_by": "123456789"
},
{
"id": "987654321",
"brand_id": "987654321",
"metadata_id": "456789012",
"image_id": "789012345",
"is_tangible": true,
"has_details": false,
"has_pricing": false,
"is_organized": true,
"is_published": false,
"needs_review": true,
"out_of_sync": false,
"syncing_paused_at": null,
"status": "DRAFT",
"name": "Sample Product 2",
"model_type": "Simple",
"product_code": "123ABC",
"product_category": "Electronics",
"product_type": "Gadget",
"product_lifecycle_status": "Active",
"weight": "1.5",
"weight_unit": "kg",
"size_unit": "cm",
"length": "10",
"width": "5",
"height": "15",
"country_of_origin": "US",
"commodity_description": "Another description.",
"taxable": false,
"tax_code": "TAX123",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "789012345",
"updated_by": "123456789"
}
]
Create a Single Product in a Sales region
This endpoint allows you to add products in a sales region.
Required Parameters
- Name
id
- Type
- string Required
- Description
- Name
product_id
- Type
- string Required
- Description
Examples
Create a single product in a sales region
curl --request POST \
--url https://api.qooly.io/v1/sales-regions/123456789/products \
--data '{
"product_id": "123456789"
}'
Create a single product in a sales region
curl --request POST \
--url https://api.qooly.io/v1/sales-regions/123456789/products \
--data '{
"product_id": "123456789"
}'
{}
Delete a Single Product in a Sales region
This endpoint allows you to remove products in a sales region.
Required Parameters
- Name
id
- Type
- string Required
- Description
- Name
product_id
- Type
- string Required
- Description
Examples
Delete a single product in a sales region
curl --request DELETE \
--url https://api.qooly.io/v1/sales-regions/123456789/products \
--data '{
"product_id": "123456789"
}'
Delete a single product in a sales region
curl --request DELETE \
--url https://api.qooly.io/v1/sales-regions/123456789/products \
--data '{
"product_id": "123456789"
}'
{}