Introduction to Partner APIs
SUBJECT TO CHANGE
Overview
GAINS Connect Partner APIs enable authorized vendor partners to directly update inventory parameters for their products within client systems. This self-service approach streamlines data management and reduces integration overhead for both partners and GAINS clients.
Partner APIs
Vendor Parameters API
The Vendor Parameters API allows authorized vendors to update supply-related parameters for their SKUs within specific client locations.
Endpoint
PUT /api/v1/partner/vendor-parameters
Purpose
Enables vendors to provide batch updates for supply parameters and constraints specific to their products within a GAINS client's system.
Supported Operations
- Update: Modify existing vendor parameter records
- Create: Add new vendor parameter records for authorized SKUs???
Note: Delete operations are not currently supported for vendor parameters.
Request Format
Headers
Content-Type: application/json
Authorization: Bearer {partner_token}
X-Partner-Supplier: {supplier_code}
Body
[
{
"ItemCode": "ITEM002",
"LocationCode": "LOC001",
"SupplierCode": "VENDOR456",
"Parameters": [
{
"StandardCost": 15.50,
"CapacityUnits": 100.0,
"IncOrderQuantity": 25.0,
"BundleWeightLB": 2.5,
"AvailableQtyLB": 500.0,
"Price": 18.75,
"RollDate1": "2024-08-15",
"RollDate2": "2024-09-15",
"RollDate3": "2024-10-15",
"ExtendedData": {
"userfield1": "Custom Value 1",
"userfield2": "Custom Value 2",
"userfield3": "Custom Value 3"
}
}
]
}
]
Field Specifications
Field | Type | Required | Description |
---|---|---|---|
ItemCode | string | Yes | SKU/Item identifier |
LocationCode | string | Yes | Location identifier |
SupplierCode | string | Yes | Must match authenticated supplier |
StandardCost | double | No | Standard cost per unit |
CapacityUnits | double | No | Capacity constraint units |
IncOrderQuantity | double | No | Incremental order quantity |
BundleWeightLB | double | No | Bundle weight in pounds |
AvailableQtyLB | double | No | Available quantity in pounds |
Price | double | No | Unit price |
RollDate1 | string | No | First roll date (ISO 8601 format) |
RollDate2 | string | No | Second roll date (ISO 8601 format) |
RollDate3 | string | No | Third roll date (ISO 8601 format) |
ExtendedData | object | No | Custom fields (userfield1-userfield20) |
Response Format
Success Response (200 OK)
{
"status": "success",
"message": "Vendor parameters updated successfully",
"taskId": "12345678-abcd-1234-efgh-123456789012",
"recordsProcessed": 1,
"timestamp": "2024-07-03T10:30:00Z"
}
Error Response (400 Bad Request)
{
"status": "error",
"message": "Validation failed",
"errors": [
{
"field": "SupplierCode",
"message": "Supplier code does not match authenticated partner"
}
],
"timestamp": "2024-07-03T10:30:00Z"
}
Authorization Rules
Partners can only update parameters for SKUs that:
- Belong to clients who have authorized the partner
- Are specifically associated with the partner as a vendor
- Match the supplier code provided in authentication headers
Updated 2 months ago