Api overview

We provide two environments - one for your live production usage, and one fully functional and free sandbox environment for testing and integration usage:

How to use the UPPLER REST API

We designed the Uppler API in a very RESTful way, so that your user experience is simple and straightforward (Wikipedia). You are able to:

  • Submit data requires an HTTP POST request
  • Retrieve data requires an HTTP GET request
  • Change data requires an HTTP PUT request

Requests must be sent using Content-Type "application/json". The request and response body encoding is always UTF-8.

Formats used

Dates All date and time values are displayed as integer numbers and represent the number of seconds since the Unix Epoch (January 1 1970 00:00:00 UTC), like PHP time() function. The date/time property type in the specification is specified as “Time”, the actual JSON type is “Number”.

Case Sensitive Parameters The field and parameter names in requests are case sensitive.

Amounts All monetary amounts are given as integer numbers in cents (by default eurocents).

Locales It's must be in these array: fr, en, it

Currencies It's must be in these currencies: EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK

The ISO_4217 format is expected

Response codes

The following HTTP codes are used by the API to respond to requests:

Response code Description
200 Request successful
400 Any kind of logical error with your request (missing parameters, invalid operation, constraint violation etc.)
403 Access is forbidden (authentication or authorisation failure)
404 Object not found
405 HTTP method not allowed (for example if you try to update a read-only object)
411 Length Required (if the request body is empty for methods that require it)
500 Internal server error - we advise you to try again later, or contact support if the problem persists

Error Object

You may get a detailed error description inside an Error object.

Property Type Description and value
Message string Technical error description
Id string The Unique Tread ID of the error
Date timestamp The error date
Type string Error type. Can be : param_error, ressource_not_found, etc.
errors array The list of the issues which triggered the HTTP error

A JSON example


{
  "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
  "Type": "param_error",
  "Id": "17c965a1-6cde-4730-910a-b6b02d79b765",
  "Date": 1440424344,
  "errors": {
    "Currency": "The code XPX cannot be found in the standard ISO 4217 : http://en.wikipedia.org/wiki/ISO_4217"
  }
}

Authentication

All API communication should be done from your server directly to our server, and not from a user's browser - otherwise your security is easily comprimised

If you use our official SDKs, the authentication is handled automatically, and you therefore do not need to worry about this page

OAuth 2.0 : Client Credentials Grant

To use this second method, you do a particular API call using an Authorization header with the Basic Access Authentication method that we just mentioned - this will give you a temporary token that you can use in all subsequent API calls until it expires.

Once you have your Authorization Header, here is the request you should make to generate an OAuth token:

POST: https://api.uppler.com/v2.01/oauth/token (change the subdomain to api.sandbox... to use the sandbox environment)

Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW

Content-Type: application/json

Body: { "grant_type": "client_credentials" }

You can see in the authorization field that we used the Authorization Header produced in the Basic Access method. Making this above request, we get the response:


{
   "access_token": "67b036bd007c40378d4be5a934f197e6",
   "token_type": "Bearer",
   "expires_in": 3600
}

We have here in the body the access_token we were looking for - from the expires_in in this case, it is available for 3600 seconds (although this may vary and therefore you should react accourdingly). While it is available (ie it hasn't expired), you can communicate with our service by adding this token to the Authorization header in your HTTP requests in a similar way for the Basic method mentioned above, however instead of adding "Basic ", we add "Bearer " - for example:

Bearer 67b036bd007c40378d4be5a934f197e6

Once your token has expired, you can just repeat the above step to get a new one. Operating in this way means that you only transmit your very senstive credentials (the Passphrase) when you need a token, and not for every single API call. The rest of the time, it is your “tokenized temporary credentials” that are transmitted with every call you make.

You must not create a token for every API call you do - only when your token has expired, and you need to replace it

SSL Settings

Settings for PRODUCTION

We use a standard HTTPS with TLS. The certificate is in sha2.

All Linux librairies (java, apache , ruby , python , php, etc.) are compatible since 2006.

Companies

The Company Object

The Company details object allows you to view and edit various details.

Parameters

id
integer

An ID for the Company

reference
string

The reference for the Company

name
string

The pretty name for the Company

typeId
integer

ID of the Type of Company

sectorId
integer

ID of the Sector of Company

companyNumber
string

The company number for the Company

vat
string

The VAT for the Company

code
string

The code for the Company

phone
string

The phone for the Company

users
Array

Array of Ids of User of the Company

addressId
integer

ID of the Address of Company

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
GET .../company/:id HTTP/1.1
{
    "id": 8494514,
    "reference": "130329",
    "name": "A Company",
    "typeId": 5,
    "sectorId": 12,
    "companyNumber": "FR2340234923493",
    "vat": "3223523059235239523",
    "code": "3240",
    "phone": "+33123456789",
    "users": { 324234, 324298 },
    "addressId": 234234,
    "createdAt": 565052400,
    "updatedAt": 1497650400
}
                
            

Create an company

POST .../company/

Parameters

reference
string
optional

The reference for the Company

name
string
required

The pretty name for the Company

typeId
integer
required

ID of the Type of Company

sectorId
integer
required

ID of the Sector of Company

companyNumber
string
optional

The company number for the Company

vat
string
optional

The VAT for the Company

code
string
optional

The code for the Company

phone
string
optional

The phone for the Company

users
Array
required

Array of Ids of User of the Company

addressId
integer
optional

ID of the Address of Company

  • Code
                
POST .../company/ HTTP/1.1
Body Parameters :
{
    "reference": "130329",
    "name": "A Company",
    "typeId": 5,
    "sectorId": 12,
    "companyNumber": "FR2340234923493",
    "vat": null,
    "code": null,
    "phone": "+33123456789",
    "users": { 324234 },
    "addressId": 234234,
}

##response
HTTP/1.1 200 (OK)
{
    "id": 8494514,
    "reference": "130329",
    "name": "A Company",
    "typeId": 5,
    "sectorId": 12,
    "companyNumber": "FR2340234923493",
    "vat": null,
    "code": null,
    "phone": "+33123456789",
    "users": { 324234 },
    "addressId": 234234,
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update an company

PUT .../company/id/

Parameters

reference
string
optional

The reference for the Company

name
string
optional

The pretty name for the Company

typeId
integer
optional

ID of the Type of Company

sectorId
integer
optional

ID of the Sector of Company

companyNumber
string
optional

The company number for the Company

vat
string
optional

The VAT for the Company

code
string
optional

The code for the Company

phone
string
optional

The phone for the Company

users
Array
optional

Array of Ids of User of the Company

addressId
integer
optional

ID of the Address of Company

  • Code
                
PUT .../company/:id HTTP/1.1
Body Parameters :
{
    "reference": "13032889",
    "name": "A Company renamed",
    "vat": "3223523059235239523",
    "code": "3240",
    "users": { 324234, 324298 }
}

##response
HTTP/1.1 200 (OK)
{
    "id": 8494514,
    "reference": "13032889",
    "name": "A Company renamed",
    "typeId": 5,
    "sectorId": 12,
    "companyNumber": "FR2340234923493",
    "vat": "3223523059235239523",
    "code": "3240",
    "phone": "+33123456789",
    "users": { 324234, 324298 },
    "addressId": 234234,
    "createdAt": 565052400,
    "updatedAt": 1442183159
}
                
            

Users

The User Object

The User details object allows you to view and edit various details.

Parameters

id
integer

An ID for the user

firstname
string

The first name for the user

lastname
string

The last name for the user

role
string

The role of the user (cf list of roles)

email
string

The email for the user

phone
string

The phone of the user

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
GET .../user/:id HTTP/1.1
{
    "id": 8494514,
    "firstname": "John",
    "lastname": "Doe",
    "role": "owner",
    "email": "john.doe@gmail.com",
    "phone": "+33123456789",
    "createdAt": 565052400,
    "updatedAt": 565052400
}
                
            

Create an user

POST .../user/

Parameters

firstname
string
required

The first name for the user

lastname
string
required

The last name for the user

role
string
required

The role of the user (cf list of roles)

email
string
required

The email for the user

password
password
required

The password for the user

confirmPassword
password
required

The confirmation of password for the user

phone
string
optional

The phone of the user

  • Code
                
POST .../user/ HTTP/1.1
Body Parameters :
{
    "firstname": "John",
    "lastname": "Doe",
    "role": "owner",
    "email": "john.doe@gmail.com",
    "phone": "+33123456789",
    "password": "MyP@ssword",
    "confirm_password": "MyP@ssword"
}

##response
HTTP/1.1 200 (OK)
{
    "id": 8494514,
    "firstname": "John",
    "lastname": "Doe",
    "role": "owner",
    "email": "john.doe@gmail.com",
    "phone": "+33123456789",
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update an user

PUT .../user/id/

Parameters

firstname
string
optional

The first name for the user

lastname
string
optional

The last name for the user

role
string
optional

The role of the user (cf list of roles)

email
string
optional

The email for the user

phone
string
optional

The phone of the user

  • Code
                
PUT .../user/:id HTTP/1.1
Body Parameters :
{
    "firstname": "Mickael",
    "email": "mickael.doe@gmail.com"
}

##response
HTTP/1.1 200 (OK)
{
    "id": 8494514,
    "firstname": "Mickael",
    "lastname": "Doe",
    "role": "owner",
    "email": "john.doe@gmail.com",
    "phone": "+33123456789",
    "createdAt": 565052400,
    "updatedAt": 1442183159
}
                
            

Products

The Product Object

The Product details object allows you to view and edit various details.

Parameters

id
integer

An ID for the product

name
Translation

The pretty name for the product

locale
string

The locale - should be "FR", "EN" or "IT"

text
string

The text of translation

description
Translation

The description of the product

locale
string

The locale - should be "FR", "EN" or "IT"

text
string

The text of translation

reference
string

The pretty reference for the product

companyId
integer

ID of the owner of the product

promotion
integer

Percentage of promotion of the product (ie : in %)

visible
boolean

Visibility of the product

prices
Price

List of product price

currency
CurrencyIso

The currency - should be ISO_4217 format

amount
integer

An amount of money in cents, e.g. 12.60€ would be represented as 1260

options
Array

Array of IDs of options of the product

categories
Array

Array of IDs of categories of the product

subcategories
Array

Array of IDs of subcategories of the product

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
GET .../product/:id HTTP/1.1
{
    "id": 8494514,
    "name": {
        "EN": "A Good Product",
        "FR": "Un bon produit"
    },
    "description": {
        "EN": "A beautiful product made wooden hand",
        "FR": "Un beau produit fait main"
    },
    "reference": "GoodProductFR123",
    "companyId": 22514,
    "promotion": 10,
    "position": 10,
    "visible": true,
    "prices": [
        {
            "currency": "EUR",
            "amount": 1200
        },
        {
            "currency": "USD",
            "amount": 1000
        }
    ],
    "options": [ 5431, 32212 ],
    "categories": [ 5431 ],
    "subcategories": [ 5481, 329 ],
    "createdAt": 565052400,
    "updatedAt": 1497650400
}
                
            

Create a product

POST .../product/

Parameters

name
Translation
required

The pretty name for the product

description
Translation
optional

The description of the product

reference
string
required

The pretty reference for the product

companyId
integer
required

ID of the owner of the product

promotion
integer
optional

Percentage of promotion of the product (ie : in %)

visible
boolean
optional

Visibility of the product

prices
Price
optional

List of product price

options
Array
optional

Array of IDs of options of the product

categories
Array
optional

Array of IDs of categories of the product

subcategories
Array
optional

Array of IDs of subcategories of the product

  • Code
                
POST .../product/ HTTP/1.1
Body Parameters :
{
    "name": {
        "EN": "A Good Product",
        "FR": "Un bon produit"
    },
    "description": {
        "EN": "A beautiful product made wooden hand",
        "FR": "Un beau produit fait main"
    },
    "reference": "GoodProductFR123",
    "companyId": 22514,
    "prices": [
        {
            "currency": "EUR",
            "amount": 1200
        },
        {
            "currency": "USD",
            "amount": 1000
        }
    ],
    "options": [ 5431, 32212 ],
    "categories": [ 5431 ],
    "subcategories": [ 5481, 329 ],
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "name": {
        "EN": "A Good Product",
        "FR": "Un bon produit"
    },
    "description": {
        "EN": "A beautiful product made wooden hand",
        "FR": "Un beau produit fait main"
    },
    "reference": "GoodProductFR123",
    "companyId": 22514,
    "promotion": 0,
    "position": 1,
    "visible": true,
    "prices": [
        {
            "currency": "EUR",
            "amount": 1200
        },
        {
            "currency": "USD",
            "amount": 1000
        }
    ],
    "options": [ 5431, 32212 ],
    "categories": [ 5431 ],
    "subcategories": [ 5481, 329 ],
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update a product

PUT .../product/id/

Parameters

name
Translation
optional

The pretty name for the product

description
Translation
optional

The description of the product

reference
string
optional

The pretty reference for the product

promotion
integer
optional

Percentage of promotion of the product (ie : in %)

visible
boolean
optional

Visibility of the product

prices
Price
optional

List of product price

options
Array
optional

Array of IDs of options of the product

categories
Array
optional

Array of IDs of categories of the product

subcategories
Array
optional

Array of IDs of subcategories of the product

  • Code
                
PUT .../product/:id HTTP/1.1
Body Parameters :
{
    "name": {
        "EN": "A Good Product",
        "FR": null
    },
    "description": {
        "FR": null
    },
    "prices": [
        {
            "currency": "USD",
            "amount": 1200
        }
    ],
    "subcategories": [ 5482 ],
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "name": {
        "EN": "A Good Product"
    },
    "description": {
        "EN": "A beautiful product made wooden hand"
    },
    "reference": "GoodProductFR123",
    "companyId": 22514,
    "promotion": 0,
    "position": 1,
    "visible": true,
    "prices": [
        {
            "currency": "EUR",
            "amount": 1200
        },
        {
            "currency": "USD",
            "amount": 1200
        }
    ],
    "options": [ 5431, 32212 ],
    "categories": [ 5431 ],
    "subcategories": [ 5482 ],
    "createdAt": 1471965687,
    "updatedAt": 1442183159
}
                
            

Options

The Option Object

The Option details object allows you to view and edit various details.

Parameters

id
integer

An ID for the option

name
Translation

The pretty name for the option

locale
string

The locale - should be "FR", "EN" or "IT"

text
string

The text of translation

values
Array

Array of string of values of the option

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
GET .../option/:id HTTP/1.1
{
    "id": 8494514,
    "name": {
        "EN": "Size",
        "FR": "Taille"
    },
    "values": [
        "XL",
        "L",
        "M",
        "S"
    ],
    "createdAt": 565052400,
    "updatedAt": 1497650400
}
                
            

Create an option

POST .../option/

Parameters

name
Translation
required

An array of name by Locale

values
Array
optional

An array of value of the Option. If no value, add "Unique" value by default

  • Code
                
POST .../option/ HTTP/1.1
Body Parameters :
{
    "name": {
        "EN": "Color",
        "FR": "Couleur"
    },
    "values": [ "Blue", "Red", "White"]
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "name": {
        "EN": "Color",
        "FR": "Couleur"
    },
    "values": [ "Blue", "Red", "White"]
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update an option

PUT .../option/id/

Parameters

name
Translation
optional

An array of name by Locale

values
Array
optional

An array of value of the Option. If no value, add "Unique" value by default

  • Code
                
PUT .../option/:id HTTP/1.1
Body Parameters :
{
    "name": {
        "EN": "Colors",
    },
    "values": [ "Red"]
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "name": {
        "EN": "Colors",
        "FR": "Couleur"
    },
    "values": [ "Red" ]
    "createdAt": 1471965687,
    "updatedAt": 1442183159
}
                
            

Categories

The Category Object

The Category details object allows you to view and edit various details.

Parameters

id
integer

An ID for the category

name
Translation

The pretty name for the category

locale
string

The locale - should be "FR", "EN" or "IT"

text
string

The text of translation

parentId
integer

ID of the parent of the category

childs
Array

Array of Ids of subcategories of the category

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
### example for a category
GET .../category/:id HTTP/1.1
{
    "id": 23104,
    "name": {
        "EN": "Summer 2016",
        "FR": "Ete 2016"
    },
    "parentId": null,
    "childs": [
        26589,
        26551,
        55959,
        80653
    ],
    "createdAt": 565052400,
    "updatedAt": 1497650400
}


### example for a subcategory
GET .../category/:id HTTP/1.1
{
    "id": 849314,
    "name": {
        "EN": "Dress",
        "FR": "Robe"
    },
    "parentId": 23104,
    "createdAt": 565052400,
    "updatedAt": 1497650400
}
                
            

Create a category

POST .../category/

Parameters

name
Translation
required

An array of name by Locale

parentId
integer
optional

ID of the parent of the Category

childs
Array
optional

An array of Ids of the Category

  • Code
                
POST .../category/ HTTP/1.1
Body Parameters :
{
    "name": {
        "EN": "Summer",
        "FR": "Ete",
        "IT": "Estate"
    }
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "name": {
        "EN": "Summer",
        "FR": "Ete",
        "IT": "Estate"
    },
    "parentId": null,
    "childs": null,
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update a category

PUT .../category/id/

Parameters

name
Translation
optional

An array of name by Locale

parentId
integer
optional

ID of the parent of the Category

childs
Array
optional

An array of Ids of the Category

  • Code
                
PUT .../category/:id HTTP/1.1
Body Parameters :
{
    "name": {
        "FR": "Ete 2016",
        "EN": null
    },
    "childs": [ 3924, 3249 ]
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "name": {
        "FR": "Ete 2016",
        "IT": "Estate"
    },
    "parentId": null,
    "childs": [ 3924, 3249 ],
    "createdAt": 1471965687,
    "updatedAt": 1442183159
}
                
            

Orders

The Order Object

The Order details object allows you to view and edit various details.

Parameters

id
integer

An ID for the order

number
string

Number of Order in max 10 characters

buyerId
integer

ID of the buyer of the order

sellerId
integer

ID of the seller of the order

state
string

State of Order : { 'pending', 'edited', 'refused', 'outside_treated', 'confirmed' }

shippingAddressId
integer

ID of the Address of shipping

billingAddressId
integer

ID of the Address of billing

sellerAddressId
integer

ID of the Address of the seller

paymentState
string

State of payment of Order : { 'pending', 'failed', 'completed' }

paymentId
integer

ID of the Payment of the Order

shipmentId
integer

ID of the Shipment of the Order

items
Array

Array of Ids of OrderItem of the Order

itemTotal
integer

Total of all OrderItem in cents, e.g. 12.60€ would be represented as 1260

promotion
integer

Percent of promotion applied at itemTotal of the Order

credit
integer

Amount substract at itemTotal after promotion, e.g. 12.60€ would be represented as 1260

tax
integer

Percent of tax applied at itemTotal after promotion and credit of the Order

total
integer

Total of Order in cents, e.g. 12.60€ would be represented as 1260

currency
CurrencyIso

The currency - should be ISO_4217 format

note
text

Note of the Order

completedAt
timestamp

When the Order was completed (after initialisation)

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
GET .../order/:id HTTP/1.1
{
    "id": 824514,
    "number": "0000000102",
    "buyerId": 12514,
    "sellerId": 1214,
    "state": "confirmed",
    "shippingAddressId": 12424,
    "billingAddressId": 12424,
    "sellerAddressId": 2414,
    "paymentState": "completed",
    "paymentId": 3421,
    "shipmentId": 3421,
    "items": [
        2042,
        2303,
        342
    ],
    "itemTotal": 15000,
    "promotion": 10,
    "credit": 200,
    "tax": 20,
    "total": 19560,
    "currency": "EUR",
    "note": "Thks to ship it quickly",
    "completedAt": 1497650400,
    "createdAt": 565052400,
    "updatedAt": 1497650400
}
                
            

Create an order

POST .../order/

Parameters

number
string
required

Number of Order in max 10 characters

buyerId
integer
required

ID of the buyer of the order

sellerId
integer
required

ID of the seller of the order

state
string
optional

State of Order : { 'pending', 'edited', 'refused', 'outside_treated', 'confirmed' }

shippingAddressId
integer
optional

ID of the Address of shipping

billingAddressId
integer
optional

ID of the Address of billing

sellerAddressId
integer
optional

ID of the Address of the seller

items
Array
required

Array of Ids of OrderItem of the Order

promotion
integer
optional

Percent of promotion applied at itemTotal of the Order

credit
integer
optional

Amount substract at itemTotal after promotion, e.g. 12.60€ would be represented as 1260

tax
integer
optional

Percent of tax applied at itemTotal after promotion and credit of the Order

note
text
optional

Note of the Order

completedAt
timestamp
optional

When the Order was completed

  • Code
                
POST .../order/ HTTP/1.1
Body Parameters :
{
    "buyerId": 12514,
    "sellerId": 1214,
    "items": [
        2042,
        2303
    ]
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "number": "0000000102",
    "buyerId": 12514,
    "sellerId": 1214,
    "state": "new",
    "shippingAddressId": 12424,
    "billingAddressId": 12424,
    "sellerAddressId": 2414,
    "paymentState": "pending",
    "paymentId": 3421,
    "shipmentId": 3421,
    "items": [
        2042,
        2303
    ],
    "itemTotal": 15000,
    "promotion": 0,
    "credit": 0,
    "tax": 20,
    "total": 18000,
    "currency": "EUR",
    "note": null,
    "completedAt": null,
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update an order

PUT .../order/id/

Parameters

number
string
optional

Number of Order in max 10 characters

buyerId
integer
optional

ID of the buyer of the order

state
string
optional

State of Order : { 'pending', 'edited', 'refused', 'outside_treated', 'confirmed' }

shippingAddressId
integer
optional

ID of the Address of shipping

billingAddressId
integer
optional

ID of the Address of billing

sellerAddressId
integer
optional

ID of the Address of the seller

items
Array
optional

Array of Ids of OrderItem of the Order

promotion
integer
optional

Percent of promotion applied at itemTotal of the Order

credit
integer
optional

Amount substract at itemTotal after promotion, e.g. 12.60€ would be represented as 1260

tax
integer
optional

Percent of tax applied at itemTotal after promotion and credit of the Order

note
text
optional

Note of the Order

completedAt
timestamp
optional

When the Order was completed

  • Code
                
PUT .../order/:id HTTP/1.1
Body Parameters :
{
    "buyerId": 12511,
    "state": "confirmed",
    "items": [
        2042,
        2303,
        3928
    ],
    "promotion": 10,
    "note": "Thks for you order",
    "completedAt": 1442183159
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "number": "0000000102",
    "buyerId": 12511,
    "sellerId": 1214,
    "state": "confirmed",
    "shippingAddressId": 12424,
    "billingAddressId": 12424,
    "sellerAddressId": 2414,
    "paymentState": "confirmed",
    "paymentId": 3421,
    "shipmentId": 3421,
    "items": [
        2042,
        2303,
        3928
    ],
    "itemTotal": 20000,
    "promotion": 10,
    "credit": 0,
    "tax": 20,
    "total": 23760,
    "currency": "EUR",
    "note": "Thks for you order",
    "completedAt": 1442183159,
    "createdAt": 1471965687,
    "updatedAt": 1442183159
}
                
            

List all Order

GET .../order/

Parameters

page
integer
optional

The page number of results you wish to return

perPage
integer
optional

The number of results to return per page

sort
string
optional

The column to sort against and direction, separated by a :

  • Code
                
GET .../order/ HTTP/1.1
Body Parameters :
{
    "page": 1,
    "perPage": 25,
    "sort": "createdAt:DESC"
}

##response
HTTP/1.1 200 (OK)
[
    {
        "id": 824514,
        "number": "0000000102",
        "buyerId": 12514,
        "sellerId": 1214,
        "state": "confirmed",
        "shippingAddressId": 12424,
        "billingAddressId": 12424,
        "sellerAddressId": 2414,
        "paymentState": "completed",
        "paymentId": 3421,
        "shipmentId": 3421,
        "items": [
            2042,
            2303,
            342
        ],
        "itemTotal": 15000,
        "promotion": 10,
        "credit": 200,
        "tax": 20,
        "total": 10640,
        "currency": "EUR",
        "note": "Thks to ship it quickly",
        "completedAt": 1497650400,
        "createdAt": 565052400,
        "updatedAt": 1497650400
    },
    {
        "id": 824514,
        "number": "0000000102",
        "buyerId": 3204,
        "sellerId": 1214,
        "state": "confirmed",
        "shippingAddressId": 12424,
        "billingAddressId": 12424,
        "sellerAddressId": 2414,
        "paymentState": "pending",
        "paymentId": 3422,
        "shipmentId": 3422,
        "items": [
            2042,
            2303
        ],
        "itemTotal": 15000,
        "promotion": null,
        "credit": null,
        "tax": 20,
        "total": 19040,
        "currency": "EUR",
        "note": "Thks to ship it quickly",
        "completedAt": 1497650400,
        "createdAt": 565052500,
        "updatedAt": 1497650400
    }
]
                
            

List of message of an order

The list of Message details object allows you to view various details about an order

Parameters

id
integer

An ID for the message

senderId
integer

ID of the sender of the order

receiverId
integer

ID of the receiver of the order

message
text

Message

createdAt
timestamp

When the item was created

  • Code
                
GET .../order/:id/message HTTP/1.1
[
	{
	    "id": 8110,
	    "senderId": 3024,
	    "receiverId": 12514,
	    "message": "It's ok for this order ?",
	    "createdAt": 565052400
	},
	{
	    "id": 8214,
	    "senderId": 12514,
	    "receiverId": 3024,
	    "message": "Yes, I just sent it",
	    "createdAt": 565052400
	}
]
                
            

Order items

The Order Item Object

The Order Item details object allows you to view and edit various details.

Parameters

id
integer

An ID for the option

productId
integer

ID of the product of the orderItem

optionValues
Array

Array of string of values of the Order Item

quantity
integer

Quantity of the orderItem

unitPrice
integer

Unit price of OrderITem in cents, e.g. 12.60€ would be represented as 1260

total
integer

Total of orderItem in cents, e.g. 12.60€ would be represented as 1260

currency
CurrencyIso

The currency - should be ISO_4217 format

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
GET .../orderitem/:id HTTP/1.1
{
    "id": 2042,
    "productId": 21039,
    "optionValues": [
        "XL",
        "Blue"
    ],
    "quantity": 10,
    "unitPrice": 1500,
    "total": 15000,
    "currency": "EUR",
    "createdAt": 565052400,
    "updatedAt": 1497650400
}
                
            

Create an order item

POST .../orderitem/

Parameters

productId
integer
required

ID of the product of the orderItem

optionValues
Array
required

Array of string of values and attached Option ID of the Order Item

quantity
integer
required

Quantity of the orderItem

unitPrice
integer
optional

Unit price of OrderITem in cents, e.g. 12.60€ would be represented as 1260

  • Code
                
POST .../orderitem/ HTTP/1.1
Body Parameters :
{
    "productId": 21039,
    "optionValues": {
        "928423": "XL",
        "928413": "Blue"
    },
    "quantity": 10,
    "unitPrice": 1200
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "productId": 21039,
    "optionValues": [
        "XL",
        "Blue"
    ],
    "quantity": 10,
    "unitPrice": 1200,
    "total": 12000,
    "currency": "EUR",
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update an order item

PUT .../orderitem/id/

Parameters

optionValues
Array
optional

Array of string of values and attached Option ID of the Order Item

quantity
integer
optional

Quantity of the orderItem

unitPrice
integer
optional

Unit price of OrderITem in cents, e.g. 12.60€ would be represented as 1260

  • Code
                
PUT .../orderitem/:id HTTP/1.1
Body Parameters :
{
    "optionValues": {
        "928413": "White"
    },
    "quantity": 2,
    "unitPrice": 1000
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "productId": 21039,
    "optionValues": [
        "White"
    ],
    "quantity": 2,
    "unitPrice": 1000,
    "total": 2000,
    "currency": "EUR",
    "createdAt": 565052400,
    "updatedAt": 1442183159
}
                
            

Shipments

The Shipment Object

The Shipment details object allows you to view and edit various details.

Parameters

id
integer

An ID for the shipment

state
string

State of Shipment : { 'pending', 'failed', 'completed' }

carrier
string

carrier of Shipment

sendindDate
timestamp

When the shipment was sent

accountNumber
string

account number of carrier of Shipment

tracking
string

tracking of carrier of Shipment

deliveryDate
timestamp

When the shipment was delivred

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
GET .../shipment/:id HTTP/1.1
{
    "id": 9842,
    "state": "shipped",
    "carrier": "DHL",
    "sendingDate": 1497650100,
    "accountNumber": "234091149",
    "tracking": "MZF22349DAXZ20",
    "deliveryDate": 1497650400,
    "createdAt": 565052400,
    "updatedAt": 1497650400
}
                
            

Create a shipment

POST .../shipment/

Parameters

state
string
optional

State of Shipment : { 'pending', 'failed', 'completed' }

carrier
string
optional

carrier of Shipment

sendindDate
timestamp
optional

When the shipment was sent

accountNumber
string
optional

account number of carrier of Shipment

tracking
string
optional

tracking of carrier of Shipment

deliveryDate
timestamp
optional

When the shipment was delivred

  • Code
                
POST .../shipment/ HTTP/1.1
Body Parameters :
{
    "carrier": "DHL",
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "state": "pending",
    "carrier": "DHL",
    "sendingDate": null,
    "accountNumber": null,
    "tracking": null,
    "deliveryDate": null,
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update a shipment

PUT .../shipment/id/

Parameters

state
string
optional

State of Shipment : { 'pending', 'failed', 'completed' }

carrier
string
optional

carrier of Shipment

sendindDate
timestamp
optional

When the shipment was sent

accountNumber
string
optional

account number of carrier of Shipment

tracking
string
optional

tracking of carrier of Shipment

deliveryDate
timestamp
optional

When the shipment was delivred

  • Code
                
PUT .../shipment/:id HTTP/1.1
Body Parameters :
{
    "sendingDate": 1472488017,
    "accountNumber": "LZFPZEFOMZ1234",
    "tracking": "ALFAZK12103921494",
    "deliveryDate": 1474648017,
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "state": "pending",
    "carrier": "DHL",
    "sendingDate": 1472488017,
    "accountNumber": "LZFPZEFOMZ1234",
    "tracking": "ALFAZK12103921494",
    "deliveryDate": 1474648017,
    "createdAt": 1471965687,
    "updatedAt": 1442183159
}
 
                
            

Payments

The Payment Object

The Payment details object allows you to view and edit various details.

Parameters

id
integer

An ID for the payment

state
string

State of Payment : { 'pending', 'failed', 'completed' }

method
string

Method of Payment : { 'transfer', 'check', 'credit_card', 'outside' }

amount
integer

An amount of money in cents, e.g. 12.60€ would be represented as 1260

currency
CurrencyIso

The currency - should be ISO_4217 format

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
GET .../payment/:id HTTP/1.1
{
    "id": 20242,
    "state": "completed",
    "method": "credit_card",
    "amount": 12000,
    "currency": "EUR",
    "createdAt": 565052400,
    "updatedAt": 1497650400
}
                
            

Create a payment

POST .../payment/

Parameters

state
string
optional

State of Payment : { 'pending', 'failed', 'completed' }

method
string
required

Method of Payment : { 'transfer', 'check', 'credit_card', 'outside' }

amount
integer
required

An amount of money in cents, e.g. 12.60€ would be represented as 1260

currency
CurrencyIso
required

The currency - should be ISO_4217 format

  • Code
                
POST .../payment/ HTTP/1.1
Body Parameters :
{
    "method": "credit_card",
    "amount": 12000,
    "currency": "EUR"
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "state": "pending",
    "method": "credit_card",
    "amount": 12000,
    "currency": "EUR",
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update a payment

PUT .../payment/id/

Parameters

state
string
optional

State of Payment : { 'pending', 'failed', 'completed' }

method
string
optional

Method of Payment : { 'transfer', 'check', 'credit_card', 'outside' }

amount
integer
optional

An amount of money in cents, e.g. 12.60€ would be represented as 1260

currency
CurrencyIso
optional

The currency - should be ISO_4217 format

  • Code
                
PUT .../payment/:id HTTP/1.1
Body Parameters :
{
    "state": "completed",
    "method": transfer
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "state": "pending",
    "method": "credit_card",
    "amount": 12000,
    "currency": "EUR",
    "createdAt": 1471965687,
    "updatedAt": 1442183159
}
                
            

Addresses

The Address Object

The Address details object allows you to view and edit various details.

Parameters

id
integer

An ID for the address

firstName
string

The first name for the Address

lastName
string

The last name for the Address

company
string

The comapny for the Address

street
string

The street for the Address

postcode
string

The post code for the Address

city
string

The city for the Address

country
CountryIso

The Country of Address - should be ISO_3166-1 alpha-2 format

vat
string

The vat for the Address

createdAt
timestamp

When the item was created

updatedAt
timestamp

When the item was updated for the last time

  • Code
                
GET .../address/:id HTTP/1.1
{
    "id": 10242,
    "firstName": "John",
    "lastName": "Doe",
    "company": "John Company",
    "street": "13 rue des champs",
    "postcode": "75000",
    "city": "Paris",
    "country": "FR",
    "vat": "FR30491418",
    "createdAt": 565052400,
    "updatedAt": 1497650400
}
                
            

Create a address

POST .../address/

Parameters

firstName
string
optional

The first name for the Address

lastName
string
optional

The last name for the Address

company
string
optional

The comapny for the Address

street
string
required

The street for the Address

postcode
string
required

The post code for the Address

city
string
required

The city for the Address

country
CountryIso
required

The Country of Address - should be ISO_3166-1 alpha-2 format

vat
string
optional

The vat for the Address

  • Code
                
POST .../address/ HTTP/1.1
Body Parameters :
{
    "firstName": "John",
    "lastName": "Doe",
    "company": "John Company",
    "street": "13 rue des champs",
    "postcode": "75000",
    "city": "Paris",
    "country": "FR",
    "vat": "FR30491418",
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "firstName": "John",
    "lastName": "Doe",
    "company": "John Company",
    "street": "13 rue des champs",
    "postcode": "75000",
    "city": "Paris",
    "country": "FR",
    "vat": "FR30491418",
    "createdAt": 1471965687,
    "updatedAt": 1471965687
}
                
            

Update a address

PUT .../address/id/

Parameters

firstName
string
optional

The first name for the Address

lastName
string
optional

The last name for the Address

company
string
optional

The comapny for the Address

street
string
optional

The street for the Address

postcode
string
optional

The post code for the Address

city
string
optional

The city for the Address

country
CountryIso
optional

The Country of Address - should be ISO_3166-1 alpha-2 format

vat
string
optional

The vat for the Address

  • Code
                
PUT .../address/:id HTTP/1.1
Body Parameters :
{
    "firstName": null,
    "postcode": "75015"
    "vat": null,
}

##response
HTTP/1.1 200 (OK)
{
    "id": "15375485",
    "firstName": null,
    "lastName": "Doe",
    "company": "John Company",
    "street": "13 rue des champs",
    "postcode": "75015",
    "city": "Paris",
    "country": "FR",
    "vat": null,
    "createdAt": 1471965687,
    "updatedAt": 1442183159
}