Resource Objects
Property and common descriptions about JSON Api resources used in our system.
Delivery Order
DeliveryOrder
It's a top-level entity of delivery-order.
Property | Type | Description |
---|---|---|
client_id | int | Linked client (order creator / owner) |
courier_id | int|null | Linked courier (who deliver, if accepted) |
delivery_area_id | int | Linked Delivery area (Each order is located inside an area that contains specific settings) |
trading_point_id | int|null | Linked trading-point (From which trading-point order was placed, may be null if order placed privately) |
status | Delivery Order Statuses | Status of delivery order |
type | Delivery Order Types | Type of delivery order |
category | Delivery Order Categories | Category of delivery order |
pickup_datetime | timestamp|null Format: Y-m-d H | The date and time when the courier should pick up the order |
is_round_trip | bool | The flag that signs that the courier should return to origin after delivery |
client_price | int | The client price for the order (In pennies. Shown only for clients) |
courier_price | int | The courier price for the order (In pennies. Shown only for couriers) |
Delivery Order Place
DeliveryOrderPlace
It's a place entity of origin or destination.
Property | Type | Description |
---|---|---|
delivery_order_id | int | Linked delivery order |
type | Delivery Order Types | Type of place |
payment_type | Delivery Order Place Payment Types or null | Payment type that needs to be accepted on the place (Only if order placed as trading-point) |
payment_amount | int|null | The payment amount that needs to be paid on the place (In pennies. Only if order placed as trading-point) |
coordinates | array<[float Lat, float Lng]> | Coordinates of the place |
address | string | Address of the place |
name | string|null | Name of the person or company that need to receive the parcel |
string|null | Email of the person or company that need to receive the parcel | |
phone | string|null | Phone of the person or company that need to receive the parcel |
entrance | string|null | Entrance |
apartment | string|null | Apartment |
floor | string|null | Floor |
comment | string|null | Comment |
Delivery Order Route
DeliveryOrderRoute
It's a routing entity that links places between themselves and holds related to route data such as distance and duration.
The collection of these entities builds a full route of delivery.
Property | Type | Description |
---|---|---|
delivery_order_id | int | Linked delivery order |
origin_delivery_order_place_id | int | Origin place of the route |
destination_delivery_order_place_id | int | Destination place of the route |
status | Delivery Order Route Statuses | Status of the route progress |
distance | int | Route distance (In meters) |
duration | time Format: H:i:s | Route duration (In time data-type) |
Product
ProductRequest
It's a top-level entity of Product creation.
Property | Type | Description |
---|---|---|
title | string | Product title |
photo | string|null | Main photo (should be a url) |
quantity | int|null | Product quantity |
price | int | Product price (In pennies) |
tags | array|null | Product tags (should be an array) |
active | bool | Is the product active or not |
description | string | Product description |
categories | array | List of existing categories (should be an array) |
options | Product option request | List of product options |
ProductResponse
It's a top-level entity of Product.
Property | Type | Description |
---|---|---|
id | int | Product ID |
images | array | List of product photos url |
quantity | int|null | Product quantity |
price | int | Product price (In pennies) |
discount | int|null | Product discount (In pennies) |
price_with_discount | int | Product price + discount (In pennies) |
tags | int|null | List of product tags |
active | bool | Is the product active or not |
description | string | Product description |
categories | Product categories | List of product categories |
options | Product option response | List of product options |
Product option
ProductOptionRequest
Property | Type | Description |
---|---|---|
category_name | string | Name of category (to which products are associated) |
variants | Product variant request or null | List of products (which are associated to this option) |
ProductOptionResponse
Property | Type | Description |
---|---|---|
title | string | Category name |
can_be_empty | bool | Should this option contain options |
active | bool | Is the option active or not |
variants | Product variant response or null | Product variants for this option |
Product variant
ProductVariantRequest
Property | Type | Description |
---|---|---|
product_name | string | Product title |
price | int|null | New price for this product (In pennies) |
ProductVariantResponse
Property | Type | Description |
---|---|---|
id | int | Product ID |
title | string | Product title |
description | string|null | Product description |
discount_value | int | Discount value (In pennies) |
discount_percent | int | Discount percent (Percentage in whole numbers) |
price | int | Product price (In pennies) |
price_with_discount | int | Product price + discount value (In pennies) |
Product categories
ProductCategories
Property | Type | Description |
---|---|---|
name | string | Category name |
slug | string | Category code |
logo | string|null | Category photo url |