Skip to main content
POST
/
shops
/
{shopId}
/
orders
Create Order
curl --request POST \
  --url http://staging.qshop.ng/apiv2/shops/{shopId}/orders \
  --header 'Content-Type: application/json' \
  --data '
{
  "notes": "<string>",
  "cartId": "<string>",
  "returnUrl": "<string>",
  "billingDetails": {
    "fullName": "<string>",
    "contact": {
      "whatsApp": "<string>",
      "telephone": "<string>",
      "email": "<string>"
    },
    "address": "<string>",
    "line_1": "<string>",
    "line_2": "<string>",
    "stateData": "<string>",
    "countryData": "<string>",
    "cityData": "<string>",
    "area": "<string>",
    "geoLocation": {
      "fullAddress": "<string>",
      "zipCode": "<string>",
      "coordinates": {
        "lng": 123,
        "lat": 123
      },
      "points": {
        "type": "<string>",
        "coordinates": [
          123
        ],
        "_id": "<string>"
      },
      "addressProximity": "<string>",
      "geoNames": [
        {
          "lng": "<string>",
          "geonameId": 123,
          "name": "<string>",
          "fclName": "<string>",
          "toponymName": "<string>",
          "fcodeName": "<string>",
          "adminName1": "<string>",
          "lat": "<string>",
          "fcl": "<string>",
          "fcode": "<string>",
          "population": 123,
          "adminCode1": "<string>",
          "countryId": "<string>",
          "countryCode": "<string>",
          "countryName": "<string>",
          "adminCodes1": {
            "ISO3166_2": "<string>"
          }
        }
      ],
      "google": {
        "address_components": [
          {
            "long_name": "<string>",
            "short_name": "<string>",
            "types": [
              "<string>"
            ]
          }
        ],
        "adr_address": "<string>",
        "formatted_address": "<string>",
        "geometry": {
          "location": {
            "lat": 123,
            "lng": 123
          },
          "viewport": {
            "south": 123,
            "west": 123,
            "north": 123,
            "east": 123
          }
        },
        "name": "<string>",
        "types": [
          "<string>"
        ],
        "utc_offset": 123,
        "html_attributions": "<array>",
        "utc_offset_minutes": 123
      },
      "_id": "<string>"
    },
    "isDefault": true,
    "_id": "<string>",
    "id": "<string>"
  },
  "whatsApp": true,
  "digital": true,
  "deliveryType": "<string>",
  "currency": "<string>",
  "paymentMethod": "<string>"
}
'
{
  "msg": "<string>",
  "data": {
    "_id": "<string>",
    "orderNo": "<string>",
    "__v": 123,
    "amountSaved": 123,
    "created": "<string>",
    "customer": {
      "shop": "<string>",
      "full_name": "<string>",
      "telephone": "<string>",
      "intlTel": "<string>",
      "whatsApp": "<string>",
      "address": [
        {
          "line_1": "<string>",
          "line_2": "<string>",
          "state": "<string>",
          "city": "<string>",
          "country": "<string>",
          "zip_code": "<string>",
          "state_id": "<string>",
          "geoLocation": {
            "fullAddress": "<string>",
            "zipCode": "<string>",
            "coordinates": {
              "lng": 123,
              "lat": 123
            },
            "points": {
              "type": "<string>",
              "coordinates": [
                123
              ],
              "_id": "<string>"
            },
            "addressProximity": "<string>",
            "geoNames": [
              {
                "lng": "<string>",
                "geonameId": 123,
                "name": "<string>",
                "fclName": "<string>",
                "toponymName": "<string>",
                "fcodeName": "<string>",
                "adminName1": "<string>",
                "lat": "<string>",
                "fcl": "<string>",
                "fcode": "<string>",
                "population": 123,
                "adminCode1": "<string>",
                "countryId": "<string>",
                "countryCode": "<string>",
                "countryName": "<string>",
                "adminCodes1": {
                  "ISO3166_2": "<string>"
                }
              }
            ],
            "google": {
              "address_components": [
                {
                  "long_name": "<string>",
                  "short_name": "<string>",
                  "types": [
                    "<string>"
                  ]
                }
              ],
              "adr_address": "<string>",
              "formatted_address": "<string>",
              "geometry": {
                "location": {
                  "lat": 123,
                  "lng": 123
                },
                "viewport": {
                  "south": 123,
                  "west": 123,
                  "north": 123,
                  "east": 123
                }
              },
              "name": "<string>",
              "types": [
                "<string>"
              ],
              "utc_offset": 123,
              "html_attributions": "<array>",
              "utc_offset_minutes": 123
            },
            "_id": "<string>"
          },
          "shipping_state": "<string>",
          "countryData": "<string>",
          "cityData": "<string>",
          "stateData": "<string>",
          "description": "<string>",
          "_id": "<string>"
        }
      ],
      "email": "<string>",
      "_id": "<string>",
      "__v": 123
    },
    "customerOrderCountUpdated": true,
    "digital": true,
    "discountAmount": 123,
    "discountsApplied": "<array>",
    "email": "<string>",
    "intlTel": "<string>",
    "isComplete": true,
    "isDraft": true,
    "logistics": {
      "type": "<string>",
      "rateSnapshot": {
        "id": "<string>",
        "_id": "<string>",
        "name": "<string>",
        "media": "<string>",
        "rateType": "<string>",
        "amount": 123,
        "serviceType": "<string>",
        "currency": "<string>",
        "estimatedDeliveryETA": "<string>",
        "estimatedPickupETA": "<string>",
        "estimatedDeliveryETADateTime": "<string>",
        "estimatedPickupETADateTime": "<string>",
        "description": "<string>",
        "courier": "<string>",
        "provider": "<string>",
        "type": "<string>",
        "platform": "<string>",
        "ratings": 123,
        "meta": {
          "courier_id": "<string>",
          "courier_name": "<string>",
          "courier_image": "<string>",
          "service_code": "<string>",
          "insurance": {
            "code": "<string>",
            "fee": 123
          },
          "discount": {
            "percentage": 123,
            "symbol": "<string>",
            "discounted": 123
          },
          "service_type": "<string>",
          "waybill": true,
          "is_cod_available": true,
          "tracking_level": 123,
          "ratings": 123,
          "votes": 123,
          "connected_account": true,
          "rate_card_amount": 123,
          "pickup_eta": "<string>",
          "pickup_eta_time": "<string>",
          "dropoff_station": null,
          "pickup_station": null,
          "delivery_eta": "<string>",
          "delivery_eta_time": "<string>",
          "info": [
            "<string>"
          ],
          "currency": "<string>",
          "vat": 123,
          "total": 123,
          "tracking": {
            "bars": 123,
            "label": "<string>"
          },
          "token": "<string>"
        },
        "preferenceStatus": "<string>",
        "actualAmount": 123,
        "markup": 123,
        "markupMeta": null
      },
      "courier": "<string>",
      "platform": "<string>",
      "serviceType": "<string>",
      "history": "<array>",
      "paidWith": "<string>"
    },
    "modified": "<string>",
    "notes": "<string>",
    "paymentError": "<array>",
    "paymentState": "<string>",
    "paymentType": "<string>",
    "payments": "<array>",
    "products": [
      {
        "_id": "<string>",
        "tags": [
          {
            "_id": "<string>",
            "name": "<string>",
            "tempId": "<string>",
            "shop": "<string>",
            "__v": 123,
            "slug": "<string>",
            "productCount": 123,
            "imageUrl": "<string>"
          }
        ],
        "stock": 123,
        "digital": true,
        "media": "<string>",
        "media_type": "<string>",
        "name": "<string>",
        "price": 123,
        "shop": "<string>",
        "sale_price": 123,
        "__v": 123,
        "draft": true,
        "alwaysInStock": true,
        "costPrice": 123,
        "sku": "<string>",
        "type": "<string>",
        "slug": "<string>",
        "dimension": {
          "unit": "<string>",
          "length": 123,
          "width": 123,
          "height": 123
        },
        "weight": {
          "base": {
            "unit": "<string>",
            "value": 123
          },
          "unit": "<string>",
          "value": 123
        },
        "variantsInheritPrice": true,
        "setAttributesForVariants": true,
        "qty": 123,
        "variant": {
          "_id": "<string>",
          "price": 123,
          "sale_price": 123,
          "costPrice": 123,
          "stock": 123,
          "alwaysInStock": true,
          "isActive": true,
          "sku": "<string>",
          "weight": {
            "base": {
              "unit": "<string>",
              "value": 123
            },
            "unit": "<string>",
            "value": 123
          },
          "media": "<string>",
          "digital_download": {
            "name": "<string>",
            "url": "<string>",
            "uuid": "<string>",
            "size": null,
            "maxDownloadsPerOrder": null
          },
          "media_type": "<string>",
          "dimension": {
            "unit": "<string>",
            "length": 123,
            "width": 123,
            "height": 123
          },
          "options": [
            {
              "label": "<string>",
              "name": "<string>",
              "id": "<string>"
            }
          ]
        },
        "originalPrice": 123,
        "finalPrice": 123,
        "subTotal": 123,
        "cartItemId": "<string>"
      }
    ],
    "purchaseCurrency": {
      "currency": {
        "_id": "<string>",
        "code": "<string>",
        "symbol": "<string>",
        "nationality": "<string>",
        "exchangeRate": 123,
        "__v": 123,
        "minimumProcessingAmount": 123,
        "country": {
          "_id": "<string>",
          "name": "<string>",
          "dialCode": "<string>",
          "code": "<string>",
          "__v": 123,
          "geoId": "<string>",
          "hasPostCode": true,
          "postalCodeFormat": "<string>",
          "currencyCode": "<string>",
          "east": 123,
          "north": 123,
          "south": 123,
          "west": 123
        },
        "name": "<string>"
      },
      "snapshot": {
        "baseRate": 123,
        "currencyRate": 123,
        "isBaseCurrency": true,
        "isStoreFrontDefault": true
      },
      "amount": 123,
      "shipping": 123,
      "shippingMarkupAmount": 123
    },
    "shipping": 123,
    "shippingMarkupAmount": 123,
    "shop": "<string>",
    "source": "<string>",
    "status": {
      "_id": "<string>",
      "key": "<string>",
      "name": "<string>",
      "notes": "<string>",
      "isSystemStatus": true,
      "stage": {
        "_id": "<string>",
        "name": "<string>",
        "key": "<string>",
        "step": 123,
        "__v": 123
      },
      "orderStatusActionOnUpdate": 123
    },
    "subTotal": 123,
    "telephone": "<string>",
    "total": 123,
    "user": "<string>",
    "whatsApp": true,
    "paymentInfo": {
      "bankAccounts": [
        {
          "accountName": "<string>",
          "accountNumber": "<string>",
          "bankName": "<string>",
          "country": {
            "_id": "<string>",
            "name": "<string>",
            "dialCode": "<string>",
            "code": "<string>",
            "__v": 123,
            "geoId": "<string>",
            "hasPostCode": true,
            "postalCodeFormat": "<string>",
            "currencyCode": "<string>",
            "east": 123,
            "north": 123,
            "south": 123,
            "west": 123
          }
        }
      ],
      "description": "<string>",
      "action": "<string>",
      "type": "<string>",
      "canConfirmPayment": true,
      "shippingPaidWith": "<string>",
      "created": "<string>",
      "_total": 123
    },
    "paymentRef": {
      "type": "<string>",
      "transactionId": null
    }
  },
  "success": true
}

Path Parameters

shopId
string
required

Body

application/json
notes
string
required
cartId
string
required
returnUrl
string
required
billingDetails
object
required
whatsApp
boolean
required
digital
boolean
required
deliveryType
string
required
currency
string
required
paymentMethod
string
required

Response

200 - application/json
msg
string
required
data
object
required
success
boolean
required