Orders API

Augusta Rest API Documentation



ASG Order Push API



Purpose:

This is a REST API that can handle blank product and Sublimation product order submission requests.

API Details:

The API is a POST request that accepts a request JSON as input.

To use the staging APIs you will need to use stg8.augustasportswear.com domain for the API endpoints.

A host entry will be required as following:

34.213.62.102 stg8.augustasportswear.com

Note: Production API endpoint is www.augustasportswear.com and will submit live orders.

Request Type:

POST

Response:

Upon successful execution of the API, and order number is generated in the response

REQUEST JSON- Sample Blank Regular Request(With League Order):

{
    "credentials":{
        "logonId" : "xxxxxx",
        "password" : "xxxxxx"
    },
    "packageType":"league",
    "shipmode":"901",
    "tipNumber":"SD00002",
    "isKitOrder":"true",
    "items":[
        {
               "poNum": "11189733",
               "addressId": "1",
               "sku": "790.025.S",
               "quantity": "100",
               "playerNumber": "",
               "playerName": "",
               "designNumber" : "",
               "leagueName": "",
               "teamName": ""
        },
        {
               "poNum": "11189733",
               "addressId": "1",
               "sku": "790.025.XL",
               "quantity": "8",
               "playerNumber": "",
               "playerName": "",
               "designNumber" : "",
               "leagueName": "",
               "teamName": ""
        }
    ],
    "addresses":[
        {
               "addressId":"1",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "200 CONVENTION BLVD",
               "shipAddress2": "123",
               "shipCity": "SAN JUAN",
               "shipState": "AL",
               "shipZip": "00907",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "Y",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        },
        {
               "addressId":"2",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "500 Kisle Ave",
               "shipAddress2": "3421",
               "shipCity": "Plaifield",
               "shipState": "IL",
               "shipZip": "60465",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "N",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        }
    ]
}

Sample Sublimation Request:

{
    "credentials":{
        "logonId" : "xxxxxx",
        "password" : "xxxxxx"
    },
    "packageType":"league",
    "shipmode":"901",
    "tipNumber":"SD00002",
    "isKitOrder":"true",
    "items":[
        {
               "poNum": "11189733",
               "addressId": "1",
               "sku": "",
               "quantity": "23",
               "playerNumber": "",
               "playerName": "",
               "designNumber" : "77222",
               "leagueName": "",
               "teamName": ""
        },
        {
               "poNum": "11189733",
               "addressId": "1",
               "sku": "",
               "quantity": "23",
               "playerNumber": "",
               "playerName": "",
               "designNumber" : "75301",
               "leagueName": "",
               "teamName": ""
        }
    ],
    "addresses":[
        {
               "addressId":"1",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "200 CONVENTION BLVD",
               "shipAddress2": "123",
               "shipCity": "SAN JUAN",
               "shipState": "AL",
               "shipZip": "00907",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "Y",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        },
        {
               "addressId":"2",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "500 Kisle Ave",
               "shipAddress2": "3421",
               "shipCity": "Plaifield",
               "shipState": "IL",
               "shipZip": "60465",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "N",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        }
    ]
}

Sample Sublimation Request - One Snumber and Multiple Order:

{
    "credentials":{
        "logonId" : "xxxxxx",
        "password" : "xxxxxx"
    },
    "packageType":"league",
    "shipmode":"901",
    "tipNumber":"SD00002",
    "isKitOrder":"true",
    "items":[
        {
               "poNum": "11189733",
               "addressId": "1",
               "sku": "228180.L",
               "quantity": "1",
               "playerNumber": "",
               "playerName": "",
               "designNumber" : "637306",
               "leagueName": "",
               "teamName": ""
        },
        {
               "poNum": "11189733",
               "addressId": "2",
               "sku": "228112.2XL",
               "quantity": "1",
               "playerNumber": "",
               "playerName": "",
               "designNumber" : "637307",
               "leagueName": "",
               "teamName": ""
        }
    ],
    "addresses":[
        {
               "addressId":"1",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "200 CONVENTION BLVD",
               "shipAddress2": "123",
               "shipCity": "SAN JUAN",
               "shipState": "AL",
               "shipZip": "00907",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "Y",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        },
        {
               "addressId":"2",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "500 Kisle Ave",
               "shipAddress2": "3421",
               "shipCity": "Plaifield",
               "shipState": "IL",
               "shipZip": "60465",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "N",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        }
    ]
}

Sample Blank and Sublimation Request:

{
    "credentials":{
        "logonId" : "xxxxxx",
        "password" : "xxxxxx"
    },
    "packageType":"league",
    "shipmode":"901",
    "tipNumber":"SD00002",
    "isKitOrder":"true",
    "items":[
        {
               "poNum": "11189733",
               "addressId": "1",
               "sku": "790.025.S",
               "quantity": "100",
               "playerNumber": "",
               "playerName": "",
               "designNumber" : "",
               "leagueName": "",
               "teamName": ""
        },
        {
               "poNum": "11189733",
               "addressId": "1",
               "sku": "",
               "quantity": "23",
               "playerNumber": "",
               "playerName": "",
               "designNumber" : "75301",
               "leagueName": "",
               "teamName": ""
        }
    ],
    "addresses":[
        {
               "addressId":"1",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "200 CONVENTION BLVD",
               "shipAddress2": "123",
               "shipCity": "SAN JUAN",
               "shipState": "AL",
               "shipZip": "00907",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "Y",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        },
        {
               "addressId":"2",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "500 Kisle Ave",
               "shipAddress2": "3421",
               "shipCity": "Plaifield",
               "shipState": "IL",
               "shipZip": "60465",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "N",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        }
    ]
}

Sample Reigning Champs Request:

{
    "credentials":{
        "logonId" : "xxxxxx",
        "password" : "xxxxxx"
    },
    "packageType":"league",
    "shipmode":"901",
    "tipNumber":"SD00002",
    "isKitOrder":"true",
    "items":[
        {
               "poNum": "11189733",
               "addressId": "1",
               "sku": "790.025.S",
               "quantity": "100",
               "playerNumber": "99",
               "playerName": "Maxwell",
               "designNumber" : "",
               "leagueName": "NBA",
               "teamName": "Eagle"
        },
        {
               "poNum": "11189733",
               "addressId": "1",
               "sku": "790.025.XL",
               "quantity": "8",
               "playerNumber": "99",
               "playerName": "Maxwell",
               "designNumber" : "",
               "leagueName": "NBA",
               "teamName": "Eagle"
        }
    ],
    "addresses":[
        {
               "addressId":"1",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "200 CONVENTION BLVD",
               "shipAddress2": "123",
               "shipCity": "SAN JUAN",
               "shipState": "AL",
               "shipZip": "00907",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "Y",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        },
        {
               "addressId":"2",
               "shipTo": "ASG ",
               "attention": "Mr Books",
               "shipAddress1": "500 Kisle Ave",
               "shipAddress2": "3421",
               "shipCity": "Plaifield",
               "shipState": "IL",
               "shipZip": "60465",
               "telePhone": "9006002222",
               "residence": "Y",
               "shipComplete" : "N",
               "shipCountry": "US",
               "firstName": "Neil",
               "lastName": "Thompson"
        }
    ]
}

Sample Response(For All Request Types):

{
    "orderId": "52461308198730"
}

REQUEST JSON DETAILS

Request Nodes

The Request JSON has 3 high level nodes:

  • Credentials:
  • This node hold the userId and password

  • PackageType:
  • The package type hold the information at what level the order will be shipped, i.e whether it will be shipped at a league level, team level, or individual player level.

  • ShipMode:
  • The shipMode hold the information about the shipping method used to fulfill that order.

  • tipNumber:
  • The tipNumber hold the information about the tip number for that order.

  • isKitOrder:
  • The isKitOrder hold the information to differentiate the kit orders from normal orders.

  • Items:
  • This node holds each items that needs to be ordered by the user. There can be multiple childs for this node. Each child represent one item.

  • Address:
  • The address node holds all the addresses where the items will be shipped. Different items can be shipped to different addresses within the same order. Address node can have multiple child nodes. Each child of address node represents an address.

Credential Node

This node holds the userId and Password of the user. The API validates the user based on the logonid and password. Only if both are correct the API will process the order.

The details are as follows:

FieldName Description Required
logonId Logon id of the user Yes
password Password of the user Yes
PackageType Node

The package type hold the information at what level the order will be shipped, i.e whether it will be shipped at a league level, team level, or individual player level.

ShipMode Node

The shipMode holds the shipping method used to fulfill the order. Ex: 901, 902, 903, 904. If this node is not sent in the request, then the default shipping method 901 will be used to fulfill the order.

tipNumber Node

The tipNumber holds the tip number used to fulfill the order. Ex: SD00002. If this node is not sent in the request, then tip number will be empty.

isKitOrder Node

The isKitOrder holds the value to differentiate the kit order. true or false will be the value.

Item Node

Each child of the item node corresponds to each items in the order.

FieldName Description Required
poNumber Order po number Yes
addressId The address where the item has to be shipped. The addressId will be present in the address node with the address details Yes
Sku The item part number Yes**
quantity Quantity of the sku. Yes**
designNumber Will be used in case of Sublimation orders, the design number is the Snumber. Sublimation item will have a Snumber instead of sku Yes**
playerNumber Player number to be printed in the blank jersey (for reigning champs orders) No
playerName Player name to be printed in the blank jersey (for reigning champs orders) No
teamName Team name to be printed in the blank jersey (for reigning champs orders) No
leagueName League name to be printed in the blank jersey (for reigning champs orders) No

**In case of B2B item sku and quantity fields are compulsory, but the designNumber field is not needed. However for sublimation item ,sku and quantity are not required, instead the designNumber field is compulsory for sublimation item

Address Node

The address node holds all the different address where the items from the order needs to be shipped. Each item can have different shipping address.

UPS address validation and correction (if required) will be done as part of the API.

Field details for the Address node are:

FieldName Description Required
addessId Reference to the address id present in the item node Yes
shipto Yes
attention To whom the item needs to be shipped Yes
shipAddress1 Address line 1 Yes
shipAddress2 Address line 2 Yes
shipCity Shipping City Yes
shipZip Zip Code Yes
telephone Contact Number No
residence Yes
shipComplete Values of Y or N Yes
shipCountry Country code (US or CA) Yes
firstName First Name Yes*
lastName Last Name Yes*

*Either FirstName or LastName is compulsory


STEPS FOR INVOKING THE REST API:

The expected response code is 200(SUCCESS) and the response should return the orderId




ASG Shipping Cost API

Purpose:

Create a new REST API for Calculating shipping cost based on combination of address and product.

Overview:

The new API is used to calculate and return shipping cost as output when we send address and product information as input. Based on the ship Mode, shipping cost will be calculated.

UPS address validation and correction (if required) will be done as part of the API.

Request Type:

POST

Sample Request JSON:

{
    "logonId" : "xxxxxx",
    "password" : "xxxxxx",
    "shipTo": "ASG ",
    "shipMode": "902",
    "shipAddress1": "200 CONVENTION BLVD",
    "shipAddress2": "123",
    "shipCity": "SAN JUAN",
    "shipState": "AL",
    "shipZip": "00907",
    "telePhone": "9006002222",
    "residence": "Y",
    "attention": "ATT Narayan",
    "asgOrderSubmitProducts" : [{"sku": "790.080.S", "quantity": "10"}]
}

Response:

{
    "shippingCost": "15.0"
}

Parameter Description:
Request Parameters Description
logonId Logon id of the customer
password Password of the customer
shipTo Name of the business to which shipment to be shipped
shipMode Shipment mode
shipAddress1, shipAddress2, shipCity, shipState, shipZip Detailed shipping address
telephone Telephone number for contact
Residence Y or N to describe whether the address is residence address or commercial address
Attention Contact person name
asgOrderSubmitProducts Product details and the quantity
Response Parameters Description
shippingCost Shipping cost for the particular request



ASG Order Status API

Purpose:

Create a new REST API for getting the order status based on user id and duration/M3 order number/Ecommerce order number.

Overview:

This API is used to get the order status from M3 based on the user id and any one of the below parameters.

  • Duration
  • M3 order number
  • Ecommerce Order number
Request Type:

GET

Response:

{
    "asgOrderResponse": [
        {
            "shipMode": "UPS GRD",
            "trackingNumber": null,
            "invoiceTotal": "32.30",
            "orderDate": "2020-03-26 00:00:00.000",
            "shippingTotal": "0.00",
            "merchandisingTotal": "0.00",
            "invoiceOrderId": "0051489860",
            "ecommOrderId": "EC54078593130431",
            "shipDate": "2020-03-26 00:00:00.000",
            "orderStatus": "Submitted",
            "poNum": "789207"
        }
    ]
}

Parameter Description:
Request Parameters Description Required
logonId Logon id of the customer Yes
m3OrderNumber** M3 order number No
orderReferenceNumber** Ecommerce order number No
Interval** Order Interval in minutes (Default 30 mins) No

** Anyone of the three parameters is required to get the order status.

Response Parameters Description
shipMode Shipping mode
trackingNumber Tracking number to track the order
invoiceTotal Order total amount
orderDate Order created date
shippingTotal Shipping charge
merchandisingTotal Merchandising product cost
invoiceOrderId M3 order number
ecommOrderId Ecommerce Order number
shipDate Shipment date
orderStatus Current order status
poNum Order po number

ASG Inventory Availability API

Purpose:

This REST service will return the inventory details for the specified product. Multiple product IDs can be passed in the Request. Request and Response both will be in JSON format.

Request Type:

POST

Sample Request JSON:

{
    "asgInventoryRequest":[
        {
            "productId" : "790.080.S",
            "quantity" : "1",
            "shipMode" : "901",
        },
        {
            "productId" : "420.158.S",
            "quantity" : "1",
            "shipMode" : "901",
        }
    ]
}

Response:

{
    "asgInventoryResponse": [
        {
            "availabilityDate": "2017-12-06T05:00:00.000000000Z",
            "quantity": 12730,
            "partNumber": "790.080.S",
            "availability": true
        },
        {
            "availabilityDate": "2017-12-06T05:00:00.000000000Z",
            "quantity": 10069,
            "partNumber": "420.158.S",
            "availability": true
        }
    ]
}

Parameter Description:
Request Parameters Description Required
productId Style Name(s) Yes
Quantity Item Quantity Yes
shipMode Shipping Method Id Yes
Response Parameters Description
Quantity The inventory quantity available for the input catentry_id
availabilityDate This returns the next availability date of the style if there is no quantity available otherwise it returns null.
partNumber The style name passed
Availability Boolean flag(true/false)

ASG Order Submit API (To Be Depreciated In Future)

Purpose:

This REST service is used to place the order and generate Order.xml after the request is completed successfully. This REST service returns the customer’s orders with status and tracking information.

Request Type:

POST

Sample Request JSON:

{
    "logonId" : "xxxxxx",
    "password" : "xxxxxx",
    "poNum" : "11189733",
    "shipTo" : "ASG",
    "shipMode" : "901",
    "shipAddress1" : "500 Kisle Ave",
    "shipAddress2" : "123",
    "shipCity" : "Plaifield",
    "shipState" : "IL",
    "shipZip" : "60565",
    "telePhone" : "9006002222",
    "residence" : "Y",
    "attention" : "Mr. Books",
    "asgOrderSubmitProducts": [
        {
            "sku": "420.153.L",
            "quantity": "1"
        }
    ]
}

Response:

{
    "orderId": "52461308198730"
}

Parameter Description:
FieldName Description Required
logonId Logon id of the user Yes
password Password of the user Yes
poNumber Order po number Yes
addessId Reference to the address id present in the item node Yes
shipto Yes
attention To whom the item needs to be shipped Yes
shipMode Shipping Mode Yes
shipAddress1 Address line 1 Yes
shipAddress2 Address line 2 Yes
shipCity Shipping City Yes
shipZip Zip Code Yes
telephone Contact Number No
residence Yes
asgOrderSubmitProducts Array containing order items Yes
Error scenario:

On any Exception Scenarios, the Error will be thrown with error Key, Error Message and Error Code.

Sample Error scenario (logonId is missing):

{
    "errors": [{
        "errorCode": " ERR_MISSING_PARAMETER ",
        "errorKey": " logonId ",
        "errorMessage": " LogonId is mandatory "
        }]
}

ASG Order Lines API

Purpose:

Create a new REST API for getting the order lines based on M3 order number.

Overview:

This API is used to get the order lines from M3 based on M3 Order number.

Request Type:

GET

Response:

{
    "asgOrderLinesResponse": [
        {
            "designGroup": "0",
            "salesPrice": "3.95",
            "status": "Submitted",
            "deliveryMethod": "203",
            "lineAmount": "39.50",
            "poNumber": "100001",
            "size": "M",
            "shipmentDate": "20200723",
            "trackingNumber": "1Z3266150232646763"
            "orderedQuantity": "10.00",
            "color": "ORANGE",
            "workOrderNumber": "",
            "item": "1421 YOUTH TRAINING SHORT",
            "carrier": "POS PRM",
            "snumber": "",
            "shipCity": "ANCHORAGE",
            "shipAddress2": "",
            "rnumber": "",
            "shipState": "AZ",
            "shipAddress1": "600 E BENSON BLVD",
            "shipZip": "99503",
            "shipCountry": "US",
            "itemNumber": "1421.029.M"
        }
    ]
}

Parameter Description:
Request Parameters Description Required
m3OrderNumber** M3 order number No
orderReferenceNumber** Ecommerce order number No

** Anyone of the two parameters is required to get the order lines.

Response Parameters Description
designGroup Group name to group same decorated items
salesPrice Item selling price
status Current order status
deliveryMethod Delivery method of the order
lineAmount Order line total price
poNumber Order po number
size Item size attribute
shipmentDate Shipment date
trackingNumber Tracking number to track the order
orderedQuantity Total ordered quantity
color Item color attribute
workOrderNumber Customer art number
item Item name
carrier Order carrier name
snumber Order lines snumber
shipCity Shipping Address City
shipAddress2 Shipping Address line 2
rnumber rnumber
shipState Shipping Address State
shipAddress1 Shipping Address line 1
shipZip Shipping Address Zip
shipCountry Shipping Address Country
ASG Product and Design Details API

Purpose:

This REST service will return the product and design details based on design number / style id.

Request Type:

POST

Sample Request JSON 1:

{
    "productOrDesignNumber" : "S662605"
}

Response JSON 1:

{
    "productInfo": [
        {
            "Items": [
                {
                    "sku": "4B3VTA.RENF.2XL"
                },
                {
                    "sku": "4B3VTA.RFAD.2XL"
                },
                {
                    "sku": "4B3VTA.RFLY.2XL"
                }
            ],
            "productOrDesignNumber": "S662605",
            "ImageURLs": {
               "mockupSNum": "",
               "CDLSNum": "",
               "isApproved": "true",
               "designName": "",
               "garmentType": "",
               "imageURL": "https://static.augustasportswear.com/sublimationImages/S662605-228137_front.jpg",
               "imageURLBack": "https://static.augustasportswear.com/sublimationImages/S662605-228137_back.jpg"
           }
        }
    ]
}

Sample Request JSON 2:

{
    "productOrDesignNumber" : "S662605",
    "sku" : "4B3VTA.RENF.2XL"
}

Response JSON 2:

{
    "productInfo": [
        {
            "Items": [
                {
                    "Design SKU Match": "true",
                    "sku": "4B3VTA.RENF.2XL"
                }
            ],
            "productOrDesignNumber": "S662605",
            "ImageURLs": {
               "mockupSNum": "",
               "CDLSNum": "",
               "isApproved": "true",
               "designName": "",
               "garmentType": "",
               "imageURL": "https://static.augustasportswear.com/sublimationImages/S662605-228137_front.jpg",
               "imageURLBack": "https://static.augustasportswear.com/sublimationImages/S662605-228137_back.jpg"
           }
        }
    ]
}

Parameter Description:
Request Parameters Description Required
productOrDesignNumber S Number Yes
sku Partnumber of a SKU No
Response Parameters Description
sku List of avaialble SKUs to order for the design
Design SKU Match Returns boolean value if the SKU passed can be used in design number
productOrDesignNumber S Number
mockupSNum Mockup S Number
CDLSNum CDL S Number
isApproved CDL or mockup is approved or not true or false
designName Design name for the design number
garmentType Whether design is Top or Bottom
imageURL Front image URL
imageURLBack Back image URL