Sales region


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

JSON
{
  "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

POST
/v1/sales-regions
curl --request POST \
  --url https://api.example.com/v1/sales-regions \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Example Sales region",
  }'

Retrieve all Sales regions

This endpoint allows you to retrieve all sales regions.

Examples

Retrieve all sales regions

GET
/v1/sales-regions
curl --request GET \
  --url https://api.example.com/v1/sales-regions

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

GET
/v1/sales-regions/123456789
curl --request GET \
  --url https://api.example.com/v1/sales-regions/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

PATCH
/v1/sales-regions/123456789
curl --request PATCH \
  --url https://api.example.com/v1/sales-regions/123456789 \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "New Sales region Name",
  }'

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

DELETE
/v1/sales-regions/123456789
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

GET
/v1/sales-regions/123456789/products
curl --request GET \
  --url https://api.qooly.io/v1/sales-regions/123456789/products

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

POST
/v1/sales-regions/123456789/products
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

DELETE
/v1/sales-regions/123456789/products
curl --request DELETE \
  --url https://api.qooly.io/v1/sales-regions/123456789/products \
  --data '{
    "product_id": "123456789"
  }'