How to create an order

The method you should use to create an order in the system.
BF
Written by Beeping Fulfilment SL
Updated 3 months ago

This method allows you to create an order in the system. To access this step, you must first perform the basic authentication. The data you need to know to enter your software are:

Method: post

Uri: api/order/

Endpoint: http://app.gobeeping.com/api/order/

Curl example

curl --location --request POST 'https://app.gobeeping.com/api/order' \
--header 'Authorization: Basic ------' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data" : {
        "ref": "#69546",
        "name": "#69546",
        "external_id": 6154654651465,
        "payment_method_id":1,
        "status": 1,
        "amount":29.99,
        "total_discount":0,
        "total_shipping":0,
        "shipping_name":"jarvin David Gómez cueva",
        "shipping_address_1":"calle monte  #37 1...2",
        "shipping_zip":"08904",
        "shipping_city":"hospitalet de Llobregat",
        "shipping_province":"Barcelona",
        "shipping_country":"Spain Peninsula",
        "shipping_country_code":"ES",
        "shipping_phone":"+34637360082",
        "email":"test@test.com",
        "shop_id":24
    },
    "lines": [
      {
        "name": "Aspirador portátil 120W",
        "sga_product_id": 1230,
        "external_product_id": "6657388544090",
        "external_variant_id": "39645646848090",
        "amount": 19.99,
        "qty": 1,
        "sku": "8435411515089",
        "barcode": null
      },
      {
        "name": "Aspirador portátil 180W",
        "sga_product_id": 1231,
        "external_product_id": "6657388544090",
        "external_variant_id": "35645646848090",
        "amount": 19.99,
        "qty": 1,
        "sku": "8535411515089",
        "barcode": null
      }
    ]
}'

In order to perform the post method, you need to identify a series of elements, starting with the Basic Auth:

  • 'Authorization: Basic XXXXXXXXXXXXXXXX' : here you must place the Basic Auth obtained in the previous step: how to login.

In addition, you will find the elements divided into two blocks: data and lines.

On the one hand, the elements inside data refer to the order information, and you can identify the following ones:

  • ref: Internal reference of the order (String).
  • name: Order name (String)
  • external_id: Corresponds to the order ID of your store. In the case of Shopify, if you enter the order you want to create in the system, you will find the number at the end of the link, for example:

  • payment_method_id: Payment method used in the order.
  • status: Order status. The statuses that can be placed on an order are:
    • 1 - Pending.
    • 6 - To be confirmed (it must be confirmed manually in the system or with the "mark-to-send" endpoint to exit)
  • amount: Order amount.
  • total_discount: Amount of the discount applied to the order.
  • total_shipping: Shipping amount.
  • shipping_name: Name of the recipient.
  • shipping_address_1: Shipping address.
  • shipping_zip: Shipping zip code.
  • shipping_city: Shipping city.
  • shipping_province: Province of shipping.
  • shipping_country: Shipping country.
  • shipping_country_code: ISO code of the shipping country.
  • shipping_phone: Shipping contact phone number.
  • email: Shipping contact email.
  • shop_id: Shop ID.

On the other hand, the elements within lines refer to the information of the product that has been purchased in the order. These elements are:

  • name: Name of the product.
  • sga_product_id: ID of the product in the Beeping system.
  • external_product_id: ID of the product in Shopify.
  • external_variant_id: ID of the variant in Shopify.
  • amount: Price of the product.
  • qty: Quantity of the product.
  • sku: Product reference.
  • barcode: Product barcode.

If you want to know how to list the orders in the system, you can do it by entering this article.

And if you need to know how to mark orders for shipping, here we show you how to do it.

Did this answer your question?