Passion Graphic

Passion Graphic API (0.10.1)

Introduction

This is the documentation of Passion Graphic's API. This API uses resource-oriented URLs and is secured by an API key.
The API is reserved for Passion Graphic's customers. If you need an access, please reach out via tech@passion-graphic.fr.

If you are expecting issues using the API, please contact us using the same email above.

Getting Started

API URL

Authentication

First of all, you need to authenticate your request in order to make successful API calls. The API use the API key authentication scheme. To get an API key, you first need to contact us at tech@passion-graphic.fr.

The API key must be present in the header x-api-key.

Choosing products

Drag Racing

Products can have multiple options and a set of defined quantities. When options are set for a product, you need to specify the desired option during the order.
To provide an option, you need to submit the option ID with the option value key in the items.options property when creating a new order.

The same logic applies for defined quantities. If the product contains a set of available quantities, you need to select the desired quantity during the order in the property items.quantity.
If no defined quantities are set, it means you can put your own quantity, minimum to 1.

Note that some options are mandatory and need to be provided during the order.

The Product endpoints will give you information on products, like their available options and defined quantities.

Placing an order

Drag Racing

An order can have multiple products. An order item is a product with desired quantity and selected options. Each order item has a shipping address, so that you can specify different addresses for each product if you want to.
Use the Create Order endpoint to submit your order.

To know the total cost of your order that will vary depending on your products, quantities and options, you can use the Generate Quote endpoint.

Once you successfully created an order, you can use the provided orderId to get the order status with the order items statuses by requesting the Get order statuses endpoint.

Statuses

Order Statuses

ORDER_CREATED The order has successfully been received and will be processed shortly.
IN_PROGRESS The order is being processed.
CANCELLED The order has been canceled.
COMPLETED The order is successfully completed.

Order Item Statuses

PENDING The order item is waiting to be processed.
IN_PRODUCTION The item is in the production phase.
SHIPPED The item package has been shipped.
CANCELLED The order item has been canceled.
COMPLETED The order item is successfully completed.

Order

Manage orders

Create a new order

Before creating an order, you can compute the total amount using the Generate a quote endpoint.

Be careful to provide valid options and valid quantities for your items. If you don't, the endpoint will return a 400 error response. Read the "Choosing products" for more information.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

Create a new pet in the store

orderReferenceId
required
string

Refer to your internal order ID. Must be unique.

required
Array of objects (OrderItem) [ items non-empty ]

Array of the ordered products.

object (ShippingAddress)

The billing address.

object (OrderContact)

Information about who made the order

object

A free flat object containing custom extra information about the order.
Values can only be string, number or boolean. Arrays or nested objects are not allowed.

Responses

Request samples

Content type
application/json
{
  • "orderReferenceId": "MY-ORDER-ID-452",
  • "items": [
    ],
  • "billingAddress": {
    },
  • "contact": {
    },
  • "customData": {
    }
}

Response samples

Content type
application/json
{
  • "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5"
}

Retrieve an order by its ID

Search the order by the given ID. Returns the order found otherwise a 400 error response.

Authorizations:
apiKeyAuth
path Parameters
orderId
required
string
Examples: c33d5b69-555d-4045-86d2-85c66bc9d0d0

Responses

Response samples

Content type
application/json
{
  • "id": "58f97ce4-0338-41f1-9f8e-b91da977423a",
  • "status": "ORDER_CREATED",
  • "orderReferenceId": "ORDER-REF-AB12XSVAYXWxQZAZXYA",
  • "billingAddress": {
    },
  • "contact": {
    },
  • "price": {
    },
  • "customData": {
    },
  • "items": [
    ]
}

Get order statuses

Return the order status and the order items statuses

Authorizations:
apiKeyAuth
path Parameters
orderId
required
string
Examples: c33d5b69-555d-4045-86d2-85c66bc9d0d0

Responses

Response samples

Content type
application/json
{
  • "orderStatus": "processing",
  • "items": []
}

Product

Get information about specific products

Retrieve a product by its ID

Search the product by the given ID. Returns the product found otherwise a 400 error response.

Authorizations:
apiKeyAuth
path Parameters
productId
required
string <uuid>
Examples: c33d5b69-555d-4045-86d2-85c66bc9d0d0

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "label": "Roll-up 85 x 200 cm",
  • "definedQuantities": [
    ],
  • "options": [
    ]
}

Quote

Use quotes to compute your order total amount

Generate a quote

Generate a quote that will contains the total amount for the given order items.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

Order items

Array of objects (QuoteRequestItem)

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "costSummary": {
    }
}