API Integration (Place & Update Order)

Please check the API Reference for all technical details about the API.

Order placements and updates require authorization and need to be executed on the backend.

Authorization

35up uses the standard HTTP authorization, based on base64 encoding.

Header: Authorization
Value: basic username:password (base64 encoded)

Most tools and libraries will automatically handle this process.

Place an Order

To place an order, you need to make a POST request authorized to:

https://api.35up.io/v1/orders

All the information needed is part of the request body:

{
 "session": "123abc",
 "reference": "Order74927943",
 "customer": {
   "firstName": "Jeffrey",
   "lastName": "Bazos",
   "email": "jeffrey@nile.com",
   "phone": "001384859590"
 },
 "shippingAddress": {
   "firstName": "Jeffrey",
   "lastName": "Bazos",
   "email": "jeffrey@nile.com",
   "phone": "001384859590",
   "company": "Nile",
   "street": "Monopoly Street",
   "streetNumber": "66",
   "extra": "Top Floor",
   "city": "Seattle",
   "postcode": "98121",
   "state": "WA",
   "country": "US"
 },
 "items": [
   {
     "sku": "caseable/ HC12PXX127030XXAPIP2P",
     "qty": 2,
     "config": {
       "size": "45",
       "color": "black"
     }
   }
 ]
}

Reference information

  • Session: A session to identify the request - You can provide us any session information that you have. Please use the same session identifier you already used for the get /recommendations request.
  • Reference: This is an optional but highly recommended reference value, so you can easily identify the base product’s complementary order. Best practice here is to use your order number from the base product order.

Customer Information

  • FirstName: Your customer’s first name
  • LastName: Your customer’s last name
  • Email: Your customer’s email address
  • Phone: Your customer’s phone number (optional)

Shipping Address

The shipping address is crucial. Please make sure you always provide the correct information to avoid unhappy customers and additional costs.

  • Firstname, lastname, email, phone: These values are optional if they are the same as the information provided under "customer."
  • Company: Optional, if the order should be shipped to a company.
  • Street: Street name to which the order should be shipped.
  • StreetNumber: Street number to which the order should be shipped.
  • Extra: Additional address line, if needed.
  • City: City to which the order should be shipped.
  • Postcode: The city's postcode.
  • State: The state to which the order should be shipped in the US and Canada. Please use two-digit ISO code (ISO 3166-1 alpha-2).
  • Country: Country to which the order should be shipped. Please use two-digit ISO code (ISO 3166-1 alpha-2).

Product Items

The item’s array provides the information about which product should be ordered in what quantity:

  • SKU: Unique product identifier, provided by the product’s endpoint or the recommendation endpoint
  • QTY: Quantity of the product to be ordered
  • Config: The config object is optional and sends additional attributes about the product to 35up.

Response

If the order was successfully placed, you will receive a response with the status code 201.


{
 "id": "42CA346434",
 "status": "approved",
 "updatedAt": "1603375967",
 "createdAt": "1603375967"
}

This response contains valuable information:

  • ID: Unique ID of your 35up order. Best practice is to keep this order ID in your database.
  • Status: Status of the order.
  • UpdatedAt: Timestamp of when the order was updated for the last time.
  • CreatedAt: Timestamp of when the order was created for the last time.

Status

An order can have one of the following statuses:

  • Pending: The default state of a created order; awaits status update to proceed.
  • Approved: Order has been approved and will be processed.
  • Processing: Order is processing on the vendor side.
  • Fulfilled: Vendor shipped the order.
  • Delivered: Order arrived to the customer. Status either triggered by tracking or time.
  • Pending_cancellation: A cancellation was requested.
  • Cancelled: A cancellation was performed.
  • Closed: Final state; the order is closed. Status either triggered by time or cancellations.

Update an Order

To update an order status, you need to make an authorized PATCH request to:

The ID is the order ID received as a response to the POST order request.

https://api.35up.io/v1/orders/{id}

The request body:

{
 "status": "approved",
 "message": "order successfully paid by the customer"
}
  • Status: The new status you want the order to have. The following statuses are possible: pending, approved, cancelled.
  • Message: Optional additional information that the system will store and display.

The response will have the same structure as the POST order request response.