🔌 API Connection Status
Material & Style API: Checking...
Sales Order API: Checking...
🔑 API Configuration — Material & Style API

Configure the API base URL, API key, and Bearer token for live testing. Settings are saved to your browser's local storage.

🔑 API Configuration — Sales Order API

Configure the Sales Order API base URL, API key, and Bearer token. Stored separately from the Material & Style API config.

15
Production API Endpoints
REST
API Architecture
JSON
Request / Response Format
3
API Groups (Materials, Styles, Orders)
ℹ About This Portal

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.

Authentication x-api-key + Bearer Token
Content Type application/json
API Version v1.0
Portal Version 3.0
Materials API Overview
API Base URL:
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
Authentication

All Materials API requests require both an API key and a Bearer token.

Required Headers:

x-api-key: YOUR_API_KEY Authorization: Bearer *** Content-Type: application/json
POST /materials — Create Material

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

FieldTypeRequiredDescription
materialDevNostringYesUnique material development number (duplicate check enforced)
descriptionstringYesMaterial description
uomstringYesUnit of measure (e.g. "MTR", "KG", "PCS")
sageCategorystringNoSage accounting category code
materialTypestringNoType or category of material
materialNostringNoExternal material reference number
internalDescriptionstringNoInternal description for internal use
compositionstringNoMaterial composition (e.g. "100% Cotton")
constructionstringNoConstruction type (e.g. "Woven", "Knit")
yarnCountnumericNoYarn count value
gsmnumericNoGrams per square metre
minUsableWidthnumericNoMinimum usable width in centimetres
functionstringNoMaterial function or intended use
embroideryTypestringNoEmbroidery type if applicable
transferPrintTypestringNoTransfer print type
finishCoatingstringNoFinish or coating applied
notesstringNoAdditional notes
statusstringNoStatus (default: "Pending")
activebooleanNoActive flag (default: true)

Example Request

curl -X POST "{BASE_URL}/materials" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer *** \ -H "Content-Type: application/json" \ -d '{ "materialDevNo": "MAT-FAB-2026-001", "description": "Premium Cotton Twill Weave", "uom": "MTR", "composition": "100% Cotton", "construction": "Woven", "gsm": 180, "minUsableWidth": 145 }'

Example Request Body

{ "materialDevNo": "MAT-FAB-2026-001", "description": "Premium Cotton Twill Weave", "uom": "MTR", "materialType": "Shell Fabric", "composition": "100% Cotton", "construction": "Woven", "gsm": 180, "minUsableWidth": 145, "function": "Outerwear Shell", "finishCoating": "Water Repellent", "status": "Pending", "active": true }

Success Response (201)

{ "success": true, "materialId": "MAT-20260525-A3F7B2", "materialDevNo": "MAT-FAB-2026-001", "message": "Material created successfully" }

Error Responses

StatusCondition
400 Bad RequestValidation error in request body
401 UnauthorizedMissing or invalid credentials
409 ConflictDuplicate materialDevNo already exists
GET /materials — List Materials

Lists materials with pagination support. Returns a paginated result set with a continuation token for retrieving subsequent pages.

Query Parameters

ParameterTypeRequiredDescription
pageSizenumberNoRecords per page (default: 25, max: 100)
nextTokenstringNoPagination token for next page

Example Request

curl -X GET "{BASE_URL}/materials?pageSize=50" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer <to...div>

Success Response (200)

{ "success": true, "count": 50, "materials": [ { "materialId": "MAT-20260525-A3F7B2", "materialDevNo": "MAT-FAB-2026-001", "description": "Premium Cotton Twill Weave", "uom": "MTR", "status": "Pending", "active": true } ], "nextToken": "eyJ...", "pageSize": 50 }
GET /materials/{materialDevNo} — Get Material by Development Number

Retrieves a specific material by its development number. Returns the complete material object including all metadata fields.

Path Parameters

ParameterTypeRequiredDescription
materialDevNostringYesMaterial development number

Example Request

curl -X GET "{BASE_URL}/materials/MAT-FAB-2026-001" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer <to...div>

Error Responses

StatusCondition
404 Not FoundNo material with the specified development number exists
GET /materials/{materialDevNo}/status — Get Material Status

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

curl -X GET "{BASE_URL}/materials/MAT-FAB-2026-001/status" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer <to...div>

Success Response (200)

{ "success": true, "materialDevNo": "MAT-FAB-2026-001", "materialId": "MAT-20260525-A3F7B2", "status": "Approved", "active": true }
GET /materials/code — Sage Code Lookup

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

ParameterTypeRequiredDescription
parentMaterialCodestringYesParent material reference code
developmentNostringYesMaterial development number

Example Request

curl -X GET "{BASE_URL}/materials/code?parentMaterialCode=PARENT-FAB-045&developmentNo=MAT-FAB-2026-001" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer <to...div>

Error Responses

StatusCondition
200 OKSage code assigned; response contains sageCode
202 AcceptedProcessing still pending
Styles API Overview
API Base URL:
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

MethodPathPurpose
POST/stylesCreate a new style record
GET/stylesList styles with pagination
GET/styles/{developmentno}Retrieve a style by development number
GET/styles/{developmentno}/statusGet the processing status of a style
GET/styles/codeSage accounting code lookup
Authentication

All Styles API requests require both an API key and a Bearer token.

Required Headers:

x-api-key: YOUR_API_KEY Authorization: Bearer *** Content-Type: application/json
POST /styles — Create Style

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

FieldTypeRequiredDescription
modelNostringYesModel number (part of unique key)
developmentNostringYesDevelopment number (part of unique key)
developmentNamestringYesStyle development name
qualitystringNoQuality tier designation
styleTypestringNoStyle classification type
styleFamilystringNoStyle family grouping
basedOnStylestringNoReference to parent style
basedOnMmtstringNoReference to base measurement
productCategorystringNoProduct category
productSubCategorystringNoProduct sub-category
productClassstringNoProduct class
genderstringNoTarget gender
customerstringNoCustomer reference
seasonstringNoSeason designation (e.g. "SS26", "AW26")
validTpstringNoValid trading partner reference
styleCertificationstringNoCertification reference
sizeClassstringNoSize classification
sizeRangestringNoSize range (e.g. "S-XXL")
colorRangestringNoColour range
sellingUomstringNoSelling unit of measure

Example Request

curl -X POST "{BASE_URL}/styles" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer *** \ -H "Content-Type: application/json" \ -d '{ "modelNo": "GUS-SS26-4102", "developmentNo": "DEV-2026-SS-4102", "developmentName": "Merino Wool Blend Blazer", "quality": "Premium", "productCategory": "Tailoring", "gender": "Mens", "season": "SS26" }'

Example Request Body

{ "modelNo": "GUS-SS26-4102", "developmentNo": "DEV-2026-SS-4102", "developmentName": "Merino Wool Blend Blazer", "quality": "Premium", "styleType": "Formal", "styleFamily": "Blazers & Jackets", "productCategory": "Tailoring", "productSubCategory": "Blazers", "gender": "Mens", "customer": "Department Stores", "season": "SS26", "sizeClass": "Regular", "sizeRange": "XS-3XL", "colorRange": "Navy, Charcoal, Camel", "sellingUom": "PCS" }

Success Response (201)

{ "success": true, "styleId": "STY-20260525-B8E3C9", "modelNo": "GUS-SS26-4102", "developmentNo": "DEV-2026-SS-4102", "message": "Style created successfully" }

Error Responses

StatusCondition
400 Bad RequestValidation error in request body
409 ConflictDuplicate modelNo + developmentNo combination
GET /styles — List Styles

Lists styles with pagination support. Same pagination pattern as the Materials API.

Query Parameters

ParameterTypeRequiredDescription
pageSizenumberNoRecords per page (default: 25, max: 100)
nextTokenstringNoPagination token for next page
GET /styles/{developmentno} — Get Style by Development Number

Retrieves a specific style by its development number. Returns the complete style object including all attributes.

Path Parameters

ParameterTypeRequiredDescription
developmentnostringYesStyle development number
GET /styles/{developmentno}/status — Get Style Status

Returns the current processing status of a style. Lightweight response with style ID, development number, status, and active flag.

GET /styles/code — Sage Code Lookup

Performs a Sage accounting code lookup for styles using the model number and quality tier.

Query Parameters

ParameterTypeRequiredDescription
stylestringYesModel number
qualitystringYesQuality tier
Sales Orders API Overview
API Base URL:
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

MethodPathPurpose
POST/sales-ordersCreate 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}/statusGet order status
GET/sales-orders?status=...&pageSize=...List orders with filters
Authentication

All Sales Orders API requests require both an API key and a Bearer token.

Required Headers:

x-api-key: YOUR_API_KEY Authorization: Bearer *** Content-Type: application/json
POST /sales-orders — Create Sales Order

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)

FieldTypeRequiredDescription
customerCodestringYesBusiness Partner Code
orderDatestring (date)YesOrder date
siteCodestringYesSite or location code
currencystringYesISO currency code (e.g. "AED", "USD")
expectedDeliveryDatestring (date)YesExpected delivery date
customerPONumberstringYesCustomer PO reference (part of duplicate key)
additionalReferencestringNoAdditional reference text
warehousestringNoWarehouse code

Line Items Array (each item)

FieldTypeRequiredDescription
lineNumbernumberNoSequential line number
styleColorSizestringYesStyle Colour Size identifier
uomstringYesUnit of measure (e.g. "UN", "PCS")
quantitynumberYesOrder quantity
grossPricenumberYesGross unit price
expectedDatestring (date)YesExpected date for this line item

Example Request

curl -X POST "{ORDER_BASE_URL}/sales-orders" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer *** \ -H "Content-Type: application/json" \ -d '{ "customerCode": "BPC-AE-04512", "orderDate": "2026-05-25", "siteCode": "GUS", "currency": "AED", "expectedDeliveryDate": "2026-06-30", "customerPONumber": "PO-2026-Q2-0451", "lines": [ { "lineNumber": 1, "styleColorSize": "SS26-4102-Navy-L", "uom": "UN", "quantity": 250, "grossPrice": 385.00, "expectedDate": "2026-06-30" } ] }'

Example Request Body

{ "customerCode": "BPC-AE-04512", "orderDate": "2026-05-25", "siteCode": "GUS", "currency": "AED", "expectedDeliveryDate": "2026-06-30", "customerPONumber": "PO-2026-Q2-0451", "additionalReference": "Q2 Seasonal Collection", "warehouse": "DXB-C1", "lines": [ { "lineNumber": 1, "styleColorSize": "SS26-4102-Navy-L", "uom": "UN", "quantity": 250, "grossPrice": 385.00, "expectedDate": "2026-06-30" }, { "lineNumber": 2, "styleColorSize": "SS26-4102-Navy-M", "uom": "UN", "quantity": 180, "grossPrice": 385.00, "expectedDate": "2026-06-30" }, { "lineNumber": 3, "styleColorSize": "SS26-4102-Charcoal-XL", "uom": "UN", "quantity": 120, "grossPrice": 410.00, "expectedDate": "2026-07-15" } ] }

Success Response (201)

{ "success": true, "salesOrderNumber": "SO-20260525-A3F7B2C1", "customerCode": "BPC-AE-04512", "message": "Sales order created successfully" }

Error Responses

StatusCondition
400 Bad RequestValidation error in request body
409 ConflictDuplicate Business Partner Code + Customer PO Number
GET /sales-orders/{salesOrderNumber} — Get by Sales Order Number

Retrieves a complete sales order by its sales order number, including all line items.

Path Parameters

ParameterTypeRequiredDescription
salesOrderNumberstringYesSales order number (e.g. "SO-20260525-A3F7B2C1")

Example Request

curl -X GET "{ORDER_BASE_URL}/sales-orders/SO-20260525-A3F7B2C1" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer <to...div>
GET /sales-orders — Search by Customer PO

Searches for a sales order using the Business Partner Code and Customer PO Number combination.

Query Parameters

ParameterTypeRequiredDescription
customerCodestringYesBusiness Partner Code
customerPONumberstringYesCustomer PO Number

Example Request

curl -X GET "{ORDER_BASE_URL}/sales-orders?customerCode=BPC-AE-04512&customerPONumber=PO-2026-Q2-0451" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer <to...div>
GET /sales-orders/{salesOrderNumber}/status — Get Order Status

Returns the processing status of a specific sales order. Lightweight response containing status only (no line items).

Example Request

curl -X GET "{ORDER_BASE_URL}/sales-orders/SO-20260525-A3F7B2C1/status" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer <to...div>
GET /sales-orders — List Orders

Lists sales orders with optional status filter and pagination support.

Query Parameters

ParameterTypeRequiredDescription
pageSizenumberNoRecords per page (default: 25)
statusstringNoFilter by order status (e.g. "Created")

Example Request

curl -X GET "{ORDER_BASE_URL}/sales-orders?status=Created&pageSize=25" \ -H "x-api-key: YOUR_API_KEY" \ -H "Authorization: Bearer <to...div>
HTTP Status Codes

All API groups use standard HTTP status codes to indicate success or failure.

StatusMeaning
200 OKRequest successful, data returned
201 CreatedResource created successfully
202 AcceptedRequest accepted, processing pending
400 Bad RequestInvalid parameters or malformed request
401 UnauthorizedMissing or invalid API key / Bearer token
404 Not FoundResource not found
409 ConflictDuplicate resource (e.g. duplicate materialDevNo or customer PO)
500 Internal Server ErrorServer-side error occurred
Best Practices & Tips
  • 1. Always Include Authentication Headers
    Every API request requires both x-api-key and Authorization: Bearer headers. Requests without valid credentials will receive a 401 response.
  • 2. Check for Duplicates Before Creating
    The Materials API enforces uniqueness on materialDevNo. The Styles API enforces uniqueness on the modelNo + developmentNo combination. Use GET endpoints to check existence before POSTing.
  • 3. Use Pagination for Lists
    All list endpoints support pagination via pageSize and nextToken. 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 format MAT-YYYYMMDD-XXXXXX and Style IDs follow STY-YYYYMMDD-XXXXXX. Always store and reference IDs exactly as returned by the API.
0
Total Requests Today
0
Requests This Session
0
POST Requests
0
GET Requests
📈 Endpoint Usage

No requests recorded yet. Use the API Console to start tracking.

📊 Usage Stats
Most Used Endpoint
Success Rate
Last Request
🕑 Activity Log (Last 20)
TimestampMethodEndpointStatusUser
No activity yet
📦 Material API – Live Test

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.

👗 Style API – Live Test

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.

🛒 Sales Orders – Live Test

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.