Pull Products/Variants Copy/Imagery/Pricing and Inventory

You can utilize our API to retrieve product variants or pricing from a specific retailer. You will receive a result based on the service type you have requested.

You may use this endpoint: GET{host}v3/retailers/{retailer_id}/variants?service_type=ecommerce here.

For example, if you want to get variant data from a specific retailer, you can send the following request:

curl --request GET \
     --url https://api.cym.bio/v3/retailers/retailer_id/variants \
     --header 'Accept: application/json' \
     --data '
{
     "retailer_id": 123,
     "service_type": "ecommerce"
}
'

If successful, you will get the following response:

[
  {
    "model": "string",
    "special_sale_price_start": "2022-02-03T05:52:25.418Z",
    "special_sale_price_end": "2022-02-03T05:52:25.418Z",
    "available_inventory": 0,
    "retailers_count": 0,
    "retail_price_min": 0,
    "retail_price_max": 0,
    "wholesale_price_min": 0,
    "wholesale_price_max": 0,
    "title": "string",
    "description": "string",
    "description_extra": "string",
    "description_bullets": [
      "string"
    ],
    "images": [
      "string"
    ],
    "variants": [
      0
    ]
  }
]

Pushing Orders for Fulfillment

You can create a new e-commerce order fulfillment from a retailer from our API. Our API will return order details, like, the shipping order address, billing address, item details, and a tracking number of the order fulfillment. The shipping method codes can be provided by Cymbio or send a list of your codes.

You may use this endpoint: POST{host}v3/retailers/{retailer_id}/orders here.

For example, if you want to push orders for fulfillment, you can send the following request:

curl --request POST \
     --url https://api.cym.bio/v3/retailers/retailer_id/orders \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "retailer_order_id": "string",
     "id_in_source": "string",
     "billing_address": "string",
     "first_name": "string",
     "last_name": "string",
     "address1": "string",
     "address2": "string",
     "country": "string",
     "state": "string",
     "city": "string",
     "zip_code": "string",
     "phone_number": "string",
     "email": "string",
     "company_name": "string",
     "shipping_address": "string",
     "shipping_method_code": "string",
     "shipping_paid": 0,
     "shipping_tax": 0,
     "sales_division_code": "string",
     "sales_order_number": "string",
     "gift_message": "string",
     "is_gift": true,
     "ship_until": "2022-02-20",
     "original_created_at": "2022-02-20",
     "order_lines": [
          "string"
     ],
     "sku": "string",
     "upc": "string",
     "supplier_id": 0,
     "variant_id": 0,
     "quantity": 0,
     "billed_amount": 0,
     "tax_billed_amount": 0,
     "notes": [
          "string"
     ],
     "name": "string",
     "value": "string"
}
'

If it is successful, you will receive the following response:

{
  "success": true,
  "message": "string",
  "code": "string"
}

Pushing Orders Cancellations

You, as the retailer, may cancel an order if they run out of stock on an item and cannot fulfill the order via our API. the cancelation is made using the order ID number.

You may use this endpoint: POST{host}v3/retailers/{retailer_id}/orders/{order_id}/cancel here.

To cancel an order, please send the following request:

curl --request POST \
     --url https://api.cym.bio/v3/retailers/retailer_id/orders/order_id/cancel \
     --header 'Accept: application/json'
     --data '
{
     "retailer_id": 123,
     "order_id": 123
}
'

If it is successful, you will get the following response:

{
  "success": true,
  "message": "string",
  "code": "string"
}

Pulling Order Statuses & Tracking Numbers

There are two options for tracking orders:

Get the Status of the Orders

You can retrieve details about the order by its ID number. The return of this method would be a record (JSON objects) with matching orders containing the order status, type of order, billing address, and shipping address.

You may use this endpoint: GET{host}v3/retailers/{retailer_id}/orders/{order_id} here.

To get the status of the orders, please send the following request:

curl --request GET \
     --url https://api.cym.bio/v3/retailers/retailer_id/orders/order_id \
     --header 'Accept: application/json'
     --data '
{
     "retailer_id": 123,
     "order_id": 123
}
'

If it is successful, you will get the following response:

{
  "id": 0,
  "type": "replenish",
  "retailer_order_id": "string",
  "billing_address": {
    "first_name": "string",
    "last_name": "string",
    "address1": "string",
    "address2": "string",
    "country": "string",
    "state": "string",
    "city": "string",
    "zip_code": "string",
    "phone_number": "string",
    "email": "string",
    "company_name": "string"
  },
  "shipping_address": {
    "first_name": "string",
    "last_name": "string",
    "address1": "string",
    "address2": "string",
    "country": "string",
    "state": "string",
    "city": "string",
    "zip_code": "string",
    "phone_number": "string",
    "email": "string",
    "company_name": "string"
  },
  "shipping_method_code": "string"
}

Get All Completed/Canceled Orders

You can retrieve all retailer's orders via our API. The return of this method would be a record (JSON objects) with matching orders containing the status of the orders processing_state: completed or canceled. Although there are more statuses, they are less important.

To help you get the desired orders, use a filter to set a 'updated_at' with "greater than the value" and sort by 'updated_at' with "ascending". The answer will be paginated, so preserve the last 'updated_at' value you saw in the last order you get instead of using the current date.

You may use this endpoint: GET{host}/v3/retailers/{retailer_id}/orders with filters [here]
(https://cymbio.readme.io/reference/get-all-retailers).

To get all completed/canceled orders via our API, please send the following request:

curl --request GET \
     --url https://api.cym.bio/v3/retailers/retailer_id/order-filters \
     --header 'Accept: application/json'
     --data '
{
     "retailer_id": 123
}
'

If it is successful, you will get the following response:

{
  "completed": 0,
  "canceled": 0,
  "pending": 0
}

:email: Need help?

If you've run into an issue, please report it by emailing [email protected]. Include a description of the issue you're experiencing, provide steps to recreate it, and share the API call you did including the body/payload and the full responses that you received. A member of our team will reach out for additional info if needed.