Configure the API base URL, API key, and Bearer token for live testing. Settings are saved to your browser's local storage.
Configure the Sales Order API base URL, API key, and Bearer token. Stored separately from the Material & Style API config.
The Guston API Portal provides programmatic access to material, style, and sales order data management. Use this portal to explore the API documentation, test endpoints live, and monitor your API consumption.
Not configured
The Materials API provides comprehensive management of material records, including creation, retrieval, status tracking, and Sage accounting code lookup. All endpoints accept and return JSON payloads.
Endpoint Summary
| Method | Path | Purpose |
|---|---|---|
| POST | /materials | Create a new material record |
| GET | /materials | List materials with pagination |
| GET | /materials/{materialDevNo} | Retrieve a material by development number |
| GET | /materials/{materialDevNo}/status | Get the processing status of a material |
| GET | /materials/code | Sage accounting code lookup |
All Materials API requests require both an API key and a Bearer token.
Required Headers:
Creates a new material record. The materialDevNo field must be unique across all materials.
On success, returns a generated materialId (format: MAT-YYYYMMDD-XXXXXX).
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
| materialDevNo | string | Yes | Unique material development number (duplicate check enforced) |
| description | string | Yes | Material description |
| uom | string | Yes | Unit of measure (e.g. "MTR", "KG", "PCS") |
| sageCategory | string | No | Sage accounting category code |
| materialType | string | No | Type or category of material |
| materialNo | string | No | External material reference number |
| internalDescription | string | No | Internal description for internal use |
| composition | string | No | Material composition (e.g. "100% Cotton") |
| construction | string | No | Construction type (e.g. "Woven", "Knit") |
| yarnCount | numeric | No | Yarn count value |
| gsm | numeric | No | Grams per square metre |
| minUsableWidth | numeric | No | Minimum usable width in centimetres |
| function | string | No | Material function or intended use |
| embroideryType | string | No | Embroidery type if applicable |
| transferPrintType | string | No | Transfer print type |
| finishCoating | string | No | Finish or coating applied |
| notes | string | No | Additional notes |
| status | string | No | Status (default: "Pending") |
| active | boolean | No | Active flag (default: true) |
Example Request
Example Request Body
Success Response (201)
Error Responses
| Status | Condition |
|---|---|
| 400 Bad Request | Validation error in request body |
| 401 Unauthorized | Missing or invalid credentials |
| 409 Conflict | Duplicate materialDevNo already exists |
Lists materials with pagination support. Returns a paginated result set with a continuation token for retrieving subsequent pages.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pageSize | number | No | Records per page (default: 25, max: 100) |
| nextToken | string | No | Pagination token for next page |
Example Request
Success Response (200)
Retrieves a specific material by its development number. Returns the complete material object including all metadata fields.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| materialDevNo | string | Yes | Material development number |
Example Request
Error Responses
| Status | Condition |
|---|---|
| 404 Not Found | No material with the specified development number exists |
Returns the current processing status of a material. Provides a lightweight response containing only the material ID, development number, status, and active flag.
Example Request
Success Response (200)
Performs a Sage accounting code lookup for materials. Returns the assigned Sage code if the material has been processed, or a 202 Accepted response if the code assignment is still pending.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| parentMaterialCode | string | Yes | Parent material reference code |
| developmentNo | string | Yes | Material development number |
Example Request
Error Responses
| Status | Condition |
|---|---|
| 200 OK | Sage code assigned; response contains sageCode |
| 202 Accepted | Processing still pending |
Not configured
The Styles API enables complete lifecycle management of style records, from creation through status tracking and Sage code lookup. Styles are uniquely identified by the composite key of modelNo and developmentNo.
Endpoint Summary
| Method | Path | Purpose |
|---|---|---|
| POST | /styles | Create a new style record |
| GET | /styles | List styles with pagination |
| GET | /styles/{developmentno} | Retrieve a style by development number |
| GET | /styles/{developmentno}/status | Get the processing status of a style |
| GET | /styles/code | Sage accounting code lookup |
All Styles API requests require both an API key and a Bearer token.
Required Headers:
Creates a new style record. The combination of modelNo + developmentNo must be unique.
On success, returns a generated styleId (format: STY-YYYYMMDD-XXXXXX).
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
| modelNo | string | Yes | Model number (part of unique key) |
| developmentNo | string | Yes | Development number (part of unique key) |
| developmentName | string | Yes | Style development name |
| quality | string | No | Quality tier designation |
| styleType | string | No | Style classification type |
| styleFamily | string | No | Style family grouping |
| basedOnStyle | string | No | Reference to parent style |
| basedOnMmt | string | No | Reference to base measurement |
| productCategory | string | No | Product category |
| productSubCategory | string | No | Product sub-category |
| productClass | string | No | Product class |
| gender | string | No | Target gender |
| customer | string | No | Customer reference |
| season | string | No | Season designation (e.g. "SS26", "AW26") |
| validTp | string | No | Valid trading partner reference |
| styleCertification | string | No | Certification reference |
| sizeClass | string | No | Size classification |
| sizeRange | string | No | Size range (e.g. "S-XXL") |
| colorRange | string | No | Colour range |
| sellingUom | string | No | Selling unit of measure |
Example Request
Example Request Body
Success Response (201)
Error Responses
| Status | Condition |
|---|---|
| 400 Bad Request | Validation error in request body |
| 409 Conflict | Duplicate modelNo + developmentNo combination |
Lists styles with pagination support. Same pagination pattern as the Materials API.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pageSize | number | No | Records per page (default: 25, max: 100) |
| nextToken | string | No | Pagination token for next page |
Retrieves a specific style by its development number. Returns the complete style object including all attributes.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| developmentno | string | Yes | Style development number |
Returns the current processing status of a style. Lightweight response with style ID, development number, status, and active flag.
Performs a Sage accounting code lookup for styles using the model number and quality tier.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| style | string | Yes | Model number |
| quality | string | Yes | Quality tier |
Not configured
The Sales Orders API provides complete order lifecycle management. Orders are uniquely identified by sales order number
(format: SO-YYYYMMDD-XXXXXXXX). Duplicate detection is enforced on the
Business Partner Code + Customer PO Number combination.
Endpoint Summary
| Method | Path | Purpose |
|---|---|---|
| POST | /sales-orders | Create a new sales order |
| GET | /sales-orders/{salesOrderNumber} | Retrieve by sales order number |
| GET | /sales-orders?customerCode=...&customerPONumber=... | Search by customer PO |
| GET | /sales-orders/{salesOrderNumber}/status | Get order status |
| GET | /sales-orders?status=...&pageSize=... | List orders with filters |
All Sales Orders API requests require both an API key and a Bearer token.
Required Headers:
Creates a new sales order with one or more line items. Dates are accepted in the following formats:
YYYY-MM-DD, YYYYMMDD, or M/D/YYYY.
The combination of Business Partner Code and Customer PO Number is
checked for duplicates (409 Conflict if a duplicate exists).
Header Fields (Request Body)
| Field | Type | Required | Description |
|---|---|---|---|
| customerCode | string | Yes | Business Partner Code |
| orderDate | string (date) | Yes | Order date |
| siteCode | string | Yes | Site or location code |
| currency | string | Yes | ISO currency code (e.g. "AED", "USD") |
| expectedDeliveryDate | string (date) | Yes | Expected delivery date |
| customerPONumber | string | Yes | Customer PO reference (part of duplicate key) |
| additionalReference | string | No | Additional reference text |
| warehouse | string | No | Warehouse code |
Line Items Array (each item)
| Field | Type | Required | Description |
|---|---|---|---|
| lineNumber | number | No | Sequential line number |
| styleColorSize | string | Yes | Style Colour Size identifier |
| uom | string | Yes | Unit of measure (e.g. "UN", "PCS") |
| quantity | number | Yes | Order quantity |
| grossPrice | number | Yes | Gross unit price |
| expectedDate | string (date) | Yes | Expected date for this line item |
Example Request
Example Request Body
Success Response (201)
Error Responses
| Status | Condition |
|---|---|
| 400 Bad Request | Validation error in request body |
| 409 Conflict | Duplicate Business Partner Code + Customer PO Number |
Retrieves a complete sales order by its sales order number, including all line items.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| salesOrderNumber | string | Yes | Sales order number (e.g. "SO-20260525-A3F7B2C1") |
Example Request
Searches for a sales order using the Business Partner Code and Customer PO Number combination.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerCode | string | Yes | Business Partner Code |
| customerPONumber | string | Yes | Customer PO Number |
Example Request
Returns the processing status of a specific sales order. Lightweight response containing status only (no line items).
Example Request
Lists sales orders with optional status filter and pagination support.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pageSize | number | No | Records per page (default: 25) |
| status | string | No | Filter by order status (e.g. "Created") |
Example Request
All API groups use standard HTTP status codes to indicate success or failure.
| Status | Meaning |
|---|---|
| 200 OK | Request successful, data returned |
| 201 Created | Resource created successfully |
| 202 Accepted | Request accepted, processing pending |
| 400 Bad Request | Invalid parameters or malformed request |
| 401 Unauthorized | Missing or invalid API key / Bearer token |
| 404 Not Found | Resource not found |
| 409 Conflict | Duplicate resource (e.g. duplicate materialDevNo or customer PO) |
| 500 Internal Server Error | Server-side error occurred |
-
1. Always Include Authentication Headers
Every API request requires bothx-api-keyandAuthorization: Bearerheaders. Requests without valid credentials will receive a 401 response. -
2. Check for Duplicates Before Creating
The Materials API enforces uniqueness onmaterialDevNo. The Styles API enforces uniqueness on themodelNo+developmentNocombination. Use GET endpoints to check existence before POSTing. -
3. Use Pagination for Lists
All list endpoints support pagination viapageSizeandnextToken. Use these to efficiently retrieve large datasets. -
4. Handle Rate Limiting
Implement exponential backoff in your integrations. If you receive 429 (Too Many Requests) responses, wait before retrying. -
5. Validate IDs Before Use
Material IDs follow the formatMAT-YYYYMMDD-XXXXXXand Style IDs followSTY-YYYYMMDD-XXXXXX. Always store and reference IDs exactly as returned by the API.
| Timestamp | Method | Endpoint | Status | User |
|---|---|---|---|---|
| No activity yet | ||||
Test Material API endpoints directly from this portal. Select an endpoint, fill in the parameters, and send a live request.
Select an endpoint above to configure the request.
Test Style API endpoints directly from this portal. Select an endpoint, fill in the parameters, and send a live request.
Select an endpoint above to configure the request.
Test Sales Order API endpoints directly from this portal. Select an endpoint, fill in the parameters, and send a live request.
Select an endpoint above to configure the request.