order-api 0.0.1

Order API

Resources

order

Operations

Method and Path Description
GET /orders/:order_id

Get an order by ID.

POST /orders

Create (submit) an order.

Headers

No headers

Imports

No imports

Enums

credit_card_brand

The credit card brands supported.

Name Value Description
visa visa

mastercard mastercard

amex amex

order_status

The processing status of an order.

Name Value Description
open open

submitted submitted

processed processed

shipped shipped

cancelled cancelled

returned returned

Interfaces

No interfaces

Models

address

Example Json: Minimal | Full

Interfaces: None

An address

Field Type Required? Default Description
first_name string Yes -

The first name.

Example: John

last_name string Yes -

The last name.

Example: Doe

line1 string Yes -

The first line of the address.

Example: 19 Bowery Street

line2 string No -

The second line of the address.

Example: apt 4C

zip string Yes -

The zip code.

Maximum: 5
Example: 10017

city string Yes -

The city name.

Example: New York

state string Yes -

The state name.

Example: New York

country_code string Yes -

The country ISO code.

Example: US

credit_card

Example Json: Minimal | Full

Interfaces: None

A credit card.

Field Type Required? Default Description
number string Yes -

The credit card number.

Example: 4111 1111 1111 1111

expiration_month integer Yes -

The credit card expiration month.

Minimum: 1
Maximum: 12
Example: 4

expiration_year integer Yes -

The credit card expiration year.

Example: 2021

security_code string Yes -

The credit card security code.

Example: 123

brand credit_card_brand Yes -

The credit card brand.

Example: visa

holder_name string Yes -

The credit card holder name.

Example: Fabio Cognigni

item

Example Json: Minimal | Full

Interfaces: None

An item of the order.

Field Type Required? Default Description
upc string Yes -

The UPC code for the product.

quantity integer Yes -

The quantity of this item in the order.

Minimum: 1
Maximum: 10

order

Example Json: Minimal | Full

Interfaces: None

A customer order

Field Type Required? Default Description
id uuid Yes -

The order unique identifier.

Example: e0910d00-ff71-409a-9ad2-f8d1555176d2

user user Yes -

The customer info.

status order_status Yes -

The current status of the order.

Example: shipped

items [item] Yes -

The items of the order.

Minimum: 0
Maximum: 20

billing_address address Yes -

The billing address of the order.

shipping_address address Yes -

The shipping address of the order.

credit_card credit_card Yes -

The payment method used.

summary order_summary Yes -

the order summary amounts

order_summary

Example Json: Minimal | Full

Interfaces: None

An item of the order.

Field Type Required? Default Description
items_total integer Yes -

The total cost of the items in the order.

shipping_charge integer Yes -

The charge for shipping the order.

taxes integer Yes -

The taxes amount.

total integer Yes -

The total amount.

user

Example Json: Minimal | Full

Interfaces: None

Customer info.

Field Type Required? Default Description
id uuid Yes -

The unique ID for the user.

email string Yes -

The customer’s email address.

Unions

No unions

Annotations

No annotations