Supplier


Supplier Entity

  • Name
    id
    Type
    string
    Required
    Description

    Every supplier is assigned a unique identifier - an unsigned 64-bit integer known as the Supplier 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 supplier.

  • Name
    contact_person
    Type
    string
    Description

    The name of the contact person representing the supplier.

  • Name
    email
    Type
    string
    Description

    The email address associated with the supplier.

  • Name
    phone
    Type
    string
    Description

    The phone number associated with the supplier.

  • Name
    created_at
    Type
    timestamp
    Description

    This property indicates the time in ISO 8601 when the supplier was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    This property indicates the time in ISO 8601 when the supplier was last updated.

  • Name
    created_by
    Type
    foreignId
    Description

    This property indicates the user who created the supplier.

  • Name
    updated_by
    Type
    foreignId
    Description

    This property indicates the user who recently updated the supplier.

The Supplier Entity

JSON
{
  "id": "123456789",
  "name": "Example Supplier",
  "contact_person": "John Doe",
  "email": "john.doe@example.com",
  "phone": "+1234567890",
  "created_at": "2024-01-07T12:30:00Z",
  "updated_at": "2024-01-07T14:45:00Z",
  "created_by": "123456789",
  "updated_by": "123456789"
}

Create a Single Supplier

This endpoint allows you to create a single supplier.

Required Fields

  • Name
    name
    Type
    string
    Required
    Description
  • Name
    contact_person
    Type
    string
    Description
  • Name
    email
    Type
    string
    Description
  • Name
    phone
    Type
    string
    Description

Examples

Create a single supplier

POST
/v1/suppliers
curl --request POST \
  --url https://api.example.com/v1/suppliers \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Example Supplier",
    "contact_person": "John Doe",
    "email": "john.doe@example.com",
    "phone": "+1234567890"
  }'

Retrieve all Suppliers

This endpoint allows you to retrieve all suppliers.

Examples

Retrieve all suppliers

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

Retrieve a Single Supplier

This endpoint allows you to retrieve a single supplier.

Required Parameters

  • Name
    id
    Type
    string
    Required
    Description

Examples

Retrieve a single supplier

GET
/v1/suppliers/123456789
curl --request GET \
  --url https://api.example.com/v1/suppliers/123456789

Update a Single Supplier

This endpoint allows you to update a single supplier.

Required Parameters

  • Name
    id
    Type
    string
    Required
    Description

Examples

Update a single supplier

PATCH
/v1/suppliers/123456789
curl --request PATCH \
  --url https://api.example.com/v1/suppliers/123456789 \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "New Supplier Name",
    "contact_person": "New Contact Person",
    "email": "new.email@example.com",
    "phone": "+9876543210"
  }'

Delete a Single Supplier

This endpoint allows you to delete a single supplier.

Required Parameters

  • Name
    id
    Type
    string
    Required
    Description

Examples

Delete a single supplier

DELETE
/v1/suppliers/123456789
curl --request DELETE \
  --url https://api.qooly.io/v1/suppliers/123456789

Retrieve all Products in a Supplier

This endpoint allows you to retrieve all products in a supplier. It returns an array of Product Entity.

Required Parameters

  • Name
    id
    Type
    string
    Required
    Description

Examples

Retrieve all products in a supplier

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

Create a Single Product in a Supplier

This endpoint allows you to add products in a supplier.

Required Parameters

  • Name
    id
    Type
    string
    Required
    Description
  • Name
    product_id
    Type
    string
    Required
    Description

Examples

Create a single product in a supplier

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

Delete a Single Product in a Supplier

This endpoint allows you to remove products in a supplier.

Required Parameters

  • Name
    id
    Type
    string
    Required
    Description
  • Name
    product_id
    Type
    string
    Required
    Description

Examples

Delete a single product in a supplier

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