Getting Started with S2 Partner API

API Reference

The S2 Partner API is organized around REST. Our API has predictable resource-oriented URLs, and uses standard HTTP response codes, authentication, and verbs.

The S2 Partner API doesn't support bulk updates. You can work on only one object per request.

Onboarding

To use the S2 Partner API, you must first have valid credentials.

Once you have been approved, your account manager will send you API keys, see: Authentication

Test Environment

You can use the S2 partner API in test mode with the test base API URL, which doesn't affect your live data.

The dev base API URL is : https://s2-api.ventmere.io/partner

Going Live

Once testing is complete, you can switch to production API.

The production API URL is: https://api.s2sell.com/core/partner

Authentication

All API calls require authentication. Authentication with the API is done using a HTTP header.

Your S2 Partner account manager will set these up and communicate them with you.

You will have two access keys, one for the test environment and the other for the production environment.

  • X-AccessKey: Your access key
curl -X 'GET' \
  'https://s2-api.ventmere.io/partner/fulfillment' \
  -H 'accept: application/json' \
  -H 'X-AccessKey: YOUR-ACCESS-KEY (DEV)'
curl -X 'GET' \
  'https://api.s2sell.com/core/partner/fulfillment' \
  -H 'accept: application/json' \
  -H 'X-AccessKey: YOUR-ACCESS-KEY (PROD)'

Your API access key carries many privileges, so be sure to keep them secure! Do not share your secret API access keys in publicly accessible areas such as GitHub, client-side code, and etc.

All API requests must be made over HTTPS. API requests without authentication will also fail.

Fulfillment

You can use the Fulfillment resource to view fulfillments for a list of orders or a fulfillment order. A fulfillment represents work that is completed as part of a fulfillment order and can include one or more items. You can use the Fulfillment resource to manage fulfillments for both orders and fulfillment orders.


API: Get Fulfillments

Learn more : Specification

  • URL:

    /fulfillment

  • Method:

    GET

  • URL Params

ParameterRequiredDescription
id_listNoList of fulfillment id
next_tokenNoA token for use in pagination. Your subsequent call can include next_token=xxxxx in order to fetch the next page of the list
  • Data Params

    None

  • Success Response

    • Code: 200
      Content:
      {
        "items": [
            {
            "id": 120724,
            "fulfillment_warehouse_id": "system_84",
            "status": "shipped",
            "name": "Roland Ullrich",
            "address1": "85810 Sheridan Summit",
            "address2": "necessitatibus velit nisi",
            "address3": "incidunt aut culpa",
            "city": "Minnetonka",
            "province": "Rhode Island",
            "country_id": "AU",
            "zip": "93792",
            "phone": "(655) 941-4652 x31254",
            "items": [
                {
                "sku": "0zt9-5uk7",
                "quantity": 1
                }
            ],
            "shipments": [
                {
                "id": 119804,
                "status": "shipped",
                "carrier_id": "Australia Post",
                "tracking_numbers": [
                    "wn44vfhvqudkno3"
                ],
                "created_at": "2021-11-12T09:10:06.939357Z",
                "updated_at": "2022-08-23T17:26:32.815841Z",
                "items": [
                    {
                    "sku": "unknown_product_123899",
                    "quantity": 1
                    }
                ],
                "created_by": {
                    "id": 125,
                    "name": "Jerome Hoeger",
                    "email": "Jonatan.Connelly@hotmail.com"
                },
                "label_id": null,
                "label_type": null,
                "shipped_by": null,
                "remarks": "shawl"
                }
            ],
            "shipping_method": "standard",
            "warehouse_remarks": null,
            "created_at": "2021-11-11T11:56:04.568984Z",
            "updated_at": "2022-08-23T17:20:47.081115Z"
            }
        ]
      }
      
  • Sample Call:

        curl -X 'GET' \
            'https://s2-api.ventmere.io/partner/fulfillment' \
            -H 'accept: application/json' \
            -H 'X-AccessKey: xxxxxxxxxxxxx'
    

API: Create Fulfillment

Learn more : Specification

  • URL:

    /fulfillment

  • Method:

    POST

  • URL Params

    None

  • Data Paramss

        {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "city": "string",
            "country_id": "string",
            "fulfillment_warehouse_id": "string",
            "items": [
                {
                "quantity": 0,
                "sku": "string"
                }
            ],
            "name": "string",
            "phone": "string",
            "province": "string",
            "shipping_method": "standard",
            "zip": "string"
        }
    
  • Success Response

    • Code: 200
      Content:
        {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "city": "string",
            "country_id": "string",
            "created_at": "2022-09-30T19:39:56.848Z",
            "fulfillment_warehouse_id": "string",
            "id": 0,
            "items": [
                {
                "quantity": 0,
                "sku": "string"
                }
            ],
            "name": "string",
            "phone": "string",
            "province": "string",
            "shipments": [
                {
                "carrier_id": "string",
                "created_at": "2022-09-30T19:39:56.848Z",
                "created_by": {
                    "email": "string",
                    "id": 0,
                    "name": "string"
                },
                "id": 0,
                "items": [
                    {
                    "quantity": 0,
                    "sku": "string"
                    }
                ],
                "label_id": "string",
                "label_type": "string",
                "remarks": "string",
                "shipped_by": {
                    "email": "string",
                    "id": 0,
                    "name": "string"
                },
                "status": "pending",
                "tracking_numbers": [
                    "string"
                ],
                "updated_at": "2022-09-30T19:39:56.848Z"
                }
            ],
            "shipping_method": "string",
            "status": "created",
            "updated_at": "2022-09-30T19:39:56.848Z",
            "warehouse_remarks": "string",
            "zip": "string"
        }
      
  • Sample Call:

        curl -X 'POST' \
            'https://s2-api.ventmere.io/partner/fulfillment' \
            -H 'accept: application/json' \
            -H 'X-AccessKey: xxxxxxxxxxxxx' \
            -H 'Content-Type: application/json' \
            -d '{
                "address1": "string",
                "address2": "string",
                "address3": "string",
                "city": "string",
                "country_id": "string",
                "fulfillment_warehouse_id": "string",
                "items": [
                    {
                    "quantity": 0,
                    "sku": "string"
                    }
                ],
                "name": "string",
                "phone": "string",
                "province": "string",
                "shipping_method": "standard",
                "zip": "string"
            }'
    

Inventory Supply

Inventory supply returns the quantities of the inventory items for a specified warehouse


Get Inventory Supply

Learn more : Specification

  • URL:

    /inventory-supply

  • Method:

    GET

  • URL Params

ParameterRequiredDescription
warehouse_idYesThe id of the warehouse
sku_listNoThe list of SKU for fetching their inventory
  • Data Params

    None

  • Success Response

    • Code: 200
      Content:
        [
            {
                "sku": "h516-ozd4",
                "quantity_avaliable": 0,
                "quantity_pending": 0,
                "quantity_hold": 0
            },
            {
                "sku": "j40c-20s3",
                "quantity_avaliable": 0,
                "quantity_pending": 0,
                "quantity_hold": 0
            },
            {
                "sku": "pnb6-7w26",
                "quantity_avaliable": 0,
                "quantity_pending": 0,
                "quantity_hold": 0
            }
        ]
      
  • Sample Call:

    curl -X 'GET' \
        'https://s2-api.ventmere.io/partner/inventory-supply?warehouse_id=system_69' \
        -H 'accept: application/json' \
        -H 'X-AccessKey: xxxxxxxxxxxxx'

Product

Product resource let you fetch all your available products.


API: Get Products

Learn more : Specification

  • URL:

    /product

  • Method:

    GET

  • URL Params

ParameterRequiredDescription
next_tokenNoA token for use in pagination. Your subsequent call can include next_token=xxxxx in order to fetch the next page of the list
  • Data Params

    None

  • Success Response

    • Code: 200
      Content:
      {
        "item":[
            {
                "sku": "mluw-tb2n",
                "upc": "7990611084",
                "title": "Licensed Cotton Keyboard",
                "is_parent": false,
                "remarks": "{\"masked_data\":\"masked\"}",
                "case_pack": 10,
                "image_main": "https://loremflickr.com/640/480",
                "package_length_mm": 225,
                "package_width_mm": 97,
                "package_height_mm": 264,
                "shipping_weight_kg": 0.65,
                "case_length_mm": 508,
                "case_width_mm": 286,
                "case_height_mm": 489,
                "case_weight_kg": 7.96,
                "category": "Headphones"
            }
        ]
      }
      
  • Sample Call:

        curl -X 'GET' \
            'https://s2-api.ventmere.io/partner/product' \
            -H 'accept: application/json' \
            -H 'X-AccessKey: xxxxxxxxxxxxx'
    

Purchase Order

You can create and retrieve orders using the Purchase Order resource.


API: Get Purchase Order

Learn more : Specification

  • URL:

    /purchase-order

  • Method:

    GET

  • URL Params

ParameterRequiredDescription
id_listNoList of order id
next_tokenNoA token for use in pagination. Your subsequent call can include next_token=xxxxx in order to fetch the next page of the list
  • Data Params

    None

  • Success Response

    • Code: 200
      Content:
      [
        {
            "items": [
            {
                "completion_date": "2022-09-30T20:56:21.588Z",
                "created_at": "2022-09-30T20:56:21.588Z",
                "eta": "2022-09-30T20:56:21.588Z",
                "from_supplier": {
                "id": 0,
                "name": "string"
                },
                "id": 0,
                "items": [
                {
                    "completed_quantity": 0,
                    "quantity": 0,
                    "sku": "string"
                }
                ],
                "remarks": "string",
                "status": "pending",
                "to_warehouse_id": "string",
                "updated_at": "2022-09-30T20:56:21.588Z"
            }
            ],
            "next_token": "string"
        }
      ]
      
  • Sample Call:

        curl -X 'GET' \
            'https://s2-api.ventmere.io/partner/purchase-order' \
            -H 'accept: application/json' \
            -H 'X-AccessKey: xxxxxxxxxxxxx'
    

API: Create Purchase Order

Specification

  • URL:

    /purchase-order

  • Method:

    POST

  • URL Params:

    None

  • Data Params

        {
            "eta": "2022-09-30T21:06:03.806Z",
            "from_supplier_id": 0,
            "items": [
                {
                "quantity": 0,
                "sku": "string"
                }
            ],
            "remarks": "string",
            "to_warehouse_id": "string"
        }
    
  • Success Response

    • Code: 200
      Content:
        {
            "completion_date": "2022-09-30T21:06:03.808Z",
            "created_at": "2022-09-30T21:06:03.808Z",
            "eta": "2022-09-30T21:06:03.808Z",
            "from_supplier": {
                "id": 0,
                "name": "string"
            },
            "id": 0,
            "items": [
                {
                "completed_quantity": 0,
                "quantity": 0,
                "sku": "string"
                }
            ],
            "remarks": "string",
            "status": "pending",
            "to_warehouse_id": "string",
            "updated_at": "2022-09-30T21:06:03.808Z"
        }
      
  • Sample Call:

        curl -X 'POST' \
            'https://s2-api.ventmere.io/partner/purchase-order' \
            -H 'accept: application/json' \
            -H 'X-AccessKey: xxxxxxxxxxxxx' \
            -H 'Content-Type: application/json' \
            -d '{
                "eta": "2022-09-30T21:10:19.904Z",
                "from_supplier_id": 0,
                "items": [
                    {
                    "quantity": 0,
                    "sku": "string"
                    }
                ],
                "remarks": "string",
                "to_warehouse_id": "string"
            }'
    

Supplier

You can retrieve a list of all available supplies


API: Get Suppliers

Learn more : Specification

  • URL:

    /supplier

  • Method:

    GET

  • URL Params:

    None

  • Data Params:

    None

  • Success Response:

    • Code 200
      Content:
      [
        {
            "id": 52,
            "name": "Buckridge, Mills and Bechtelar"
        },
        {
            "id": 29,
            "name": "Buckridge - Streich"
        }
      ]
      
  • Sample Call:

        curl -X 'GET' \
            'https://s2-api.ventmere.io/partner/supplier' \
            -H 'accept: application/json' \
            -H 'X-AccessKey: xxxxxxxxxxxxxxxxxxx'
    

Warehouse

You can retrieve a list of all available warehouses


API: Get Warehouses

Learn more : Specification

  • URL:

    /warehouse

  • Method:

    GET

  • URL Params:

    None

  • Data Params:

    None

  • Success Response:

    • Code 200
      Content:
        [
            {
                "id": "system_73",
                "name": "Bailey, Prosacco and Quigley"
            },
            {
                "id": "system_51",
                "name": "Bartoletti, Mueller and Gerhold"
            },
            {
                "id": "system_87",
                "name": "Berge, Heathcote and Langosh"
            }
        ]
      
  • Sample Call:

        curl -X 'GET' \
            'https://s2-api.ventmere.io/partner/warehouse' \
            -H 'accept: application/json' \
            -H 'X-AccessKey: xxxxxxxxxxxxxxxxxxx'