Supplier
Version 1.0
Serves as the foundation for managing suppliers. Suppliers are entities representing external entities or individuals that provide products.
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
{
"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
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"
}'
Create a single supplier
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"
}'
{
"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"
}
Retrieve all Suppliers
This endpoint allows you to retrieve all suppliers.
Examples
Retrieve all suppliers
curl --request GET \
--url https://api.example.com/v1/suppliers
Retrieve all suppliers
curl --request GET \
--url https://api.example.com/v1/suppliers
[
{
"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"
},
{
"id": "987654321",
"name": "Example Supplier 2",
"contact_person": "Jane Smith",
"email": "jane.smith@example.com",
"phone": "+9876543210",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
]
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
curl --request GET \
--url https://api.example.com/v1/suppliers/123456789
Retrieve a single supplier
curl --request GET \
--url https://api.example.com/v1/suppliers/123456789
{
"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"
}
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
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"
}'
Update a single supplier
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"
}'
{
"id": "123456789",
"name": "New Supplier Name",
"contact_person": "New Contact Person",
"email": "new.email@example.com",
"phone": "+9876543210",
"created_at": "2024-01-07T12:30:00Z",
"updated_at": "2024-01-07T14:45:00Z",
"created_by": "123456789",
"updated_by": "123456789"
}
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
curl --request DELETE \
--url https://api.example.com/v1/suppliers/123456789
Delete a single supplier
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
curl --request GET \
--url https://api.qooly.io/v1/suppliers/123456789/products
Retrieve all products in a supplier
curl --request GET \
--url https://api.qooly.io/v1/suppliers/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 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
curl --request POST \
--url https://api.qooly.io/v1/suppliers/123456789/products \
--data '{
"product_id": "123456789"
}'
Create a single product in a supplier
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
curl --request DELETE \
--url https://api.qooly.io/v1/suppliers/123456789/products \
--data '{
"product_id": "123456789"
}'
Delete a single product in a supplier
curl --request DELETE \
--url https://api.qooly.io/v1/suppliers/123456789/products \
--data '{
"product_id": "123456789"
}'
{}