POST
/
2022-05
/
orders
Create/Update Order
curl --request POST \
  --url https://api.reportana.com/2022-05/orders \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "reference_id": "<string>",
  "number": "<string>",
  "admin_url": "<string>",
  "customer_name": "<string>",
  "customer_phone": "<string>",
  "customer_email": "<string>",
  "customer_document": "<string>",
  "billing_address": {
    "name": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "company": "<string>",
    "phone": "<string>",
    "address1": "<string>",
    "address2": "<string>",
    "city": "<string>",
    "province": "<string>",
    "province_code": "<string>",
    "country": "<string>",
    "country_code": "<string>",
    "zip": "<string>",
    "latitude": 123,
    "longitude": 123
  },
  "shipping_address": {
    "name": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "company": "<string>",
    "phone": "<string>",
    "address1": "<string>",
    "address2": "<string>",
    "city": "<string>",
    "province": "<string>",
    "province_code": "<string>",
    "country": "<string>",
    "country_code": "<string>",
    "zip": "<string>",
    "latitude": "<string>",
    "longitude": "<string>"
  },
  "line_items": [
    {
      "title": "<string>",
      "variant_title": "<string>",
      "quantity": 123,
      "price": 123,
      "path": "<string>",
      "image_url": "<string>",
      "tracking_number": "<string>"
    }
  ],
  "currency": "<string>",
  "total_price": 123,
  "subtotal_price": 123,
  "payment_status": "<string>",
  "payment_method": "<string>",
  "tracking_numbers": "<string>",
  "referring_site": "<string>",
  "status_url": "<string>",
  "billet_url": "<string>",
  "billet_line": "<string>",
  "billet_expired_at": "<string>",
  "original_created_at": "<string>"
}'
{
  "success": true,
  "data": null
}
Use this endpoint to create or update an order in your Reportana store. The reference_id attribute is required and must correspond to the id or unique identifier of the order in your system, ensuring proper association between your system’s data and our platform.

Headers

Authorization
string
required
Basic base64(client_id + ’:’ + client_secret)
Content-Type
string
required
Content-Type:application/json

Body

reference_id
string
required
Enter the reference ID.Example: “123456789”.
number
string
required
Enter the order number.Example: “1234”.
admin_url
string
Enter the admin panel URL for accessing the order.Example: “https://example.com/admin/orders/123456789”.
customer_name
string
required
Enter the customer’s name.Example: “John Doe”.
customer_phone
string
required
Enter the customer’s phone number.Example: “+5511911111111”.
customer_email
string
required
Enter the customer’s email address.Example: “johndoe@gmail.com”.
customer_document
string
Enter the customer’s document number.Example: “123456789”.

Billing Adress

billing_address
object
required
Enter the billing address information.
name
string
Enter the customer’s name.Example: “John Doe”.
first_name
string
Enter the customer’s first name.Example: “John”.
last_name
string
Enter the customer’s last name.Example: “Doe”.
company
string
Enter the company name.Example: “John Doe Ltda”.
phone
string
Enter the customer’s phone number.Example: “+5511911111111”.
address1
string
Enter the customer’s address.Example: “6925 Hollywood Blvd”.
address2
string
Enter the customer’s neighborhood.Example: “Times Square”.
city
string
Enter the customer’s city.Example: “New York”.
province
string
Enter the customer’s state.Example: “North Carolina”.
province_code
string
Enter the customer’s state code.Example: “NC”.
country
string
Enter the customer’s country.Example: “United States of America”.
country_code
string
Enter the customer’s country code.Example: “USA”.
zip
string
Enter the customer’s ZIP code.Example: “90213”.
latitude
number
Enter the customer’s latitude.Example: -27.807915923881836
longitude
number
Enter the customer’s longitude.Example: -50.3183162423294

Shipping Adress

shipping_address
object
required
Enter the shipping address information.
name
string
Enter the customer’s name.Example: “John Doe”.
first_name
string
Enter the customer’s first name.Example: “John”.
last_name
string
Enter the customer’s last name.Example: “Doe”.
company
string
Enter the company name.Example: “John Doe Ltda”.
phone
string
Enter the customer’s phone number.Example: “+5511911111111”.
address1
string
Enter the customer’s address.Example: “6925 Hollywood Blvd”.
address2
string
Enter the customer’s neighborhood.Example: “Times Square”.
city
string
Enter the customer’s city.Example: “New York”.
province
string
Enter the customer’s state.Example: “North Carolina”.
province_code
string
Enter the customer’s state code.Example: “NC”.
country
string
Enter the customer’s country.Example: “United States of America”.
country_code
string
Enter the customer’s country code.Example: “USA”.
zip
string
Enter the customer’s ZIP code.Example: “88508100”.
latitude
string
Enter the customer’s latitude.Example: -27.807915923881836
longitude
string
Enter the customer’s longitude.Example: -50.3183162423294

Line Items

line_items
object[]
required
Click on “Add an item” to add a product.
title
string
Enter the product title.Example: “Sunglasses”.
variant_title
string
Enter the product variant title.Example: “Black”.
quantity
number
Enter the quantity of products in the order.Example: 1
price
number
Enter the product price.Example: 49.9
path
string
Enter the public access URL of the product.Example: “https://example.com/products/1234”.
image_url
string
Enter the product image URL.Example: “https://example.com/products/1234/image.jpg”.
tracking_number
string
Enter the product tracking number.Example: “LB123456789BR”.

Payment & More Info

currency
string
required
Enter the currency used.Example: “USD”.
total_price
number
required
Enter the total amount.Example: 124.8
subtotal_price
number
required
Enter the subtotal amount.Example: 109.8
payment_status
string
Enter the payment status.Example: “PAID”.Available options: PAID, PENDING, NOT_PAID.
payment_method
string
Enter the payment method.Example: “CREDIT_CARD”.Available options: CREDIT_CARD, PIX, DEPOSIT, BOLETO, OTHER.
tracking_numbers
string
Enter the order tracking numbers.Example: “LB123456789BR,LB987654321BR”.
referring_site
string
Enter the site URL.Example: “https://www.facebook.com/”.
status_url
string
Enter the order status URL.Example: “https://example.com/orders/123456789”.
billet_url
string
Enter the payment URL.Example: “https://example.com/orders/123456789/creditcard.pdf”.
billet_line
string
Enter the billet barcode or Pix “Copy and Paste” string.
billet_expired_at
string
Enter the payment expiration date.Example: “2022-05-31”.
original_created_at
string
required
Enter the order creation date.Example: “2022-05-27 12:00”.
{
  "success": true,
  "data": null
}