Finish order combined - celdotro/marketplace GitHub Wiki

About

Finishes an order by automatically taking all the necessary steps

Class

celmarket\Orders\OrdersData

Method

finishOrderCombined

API

  • method: orders
  • action: finishOrderCombined

Parameters

  • orders_id = order's ID
  • serie = invoice series
  • nr_fact = invoice number
  • awb = AWB number
  • idAdresaRidicare = pick up address ID
  • observations = observations
  • products = products -> array
    • (arraty element) = product -> array
      • (sub-array element) = product's data
        • products_price = product's price
        • cantitate = product's quantity
        • tva = product's VAT
        • id_prod_com = product's order ID
        • deschidere_colet = package opening
        • status_livrare = delivery status
          • 0 = unverified
          • 4 = out of stock
          • 5 = ready for delivery
  • autogenerateAwb = automatically generate AWB if the courier's data was defined
    • true = string, ask for automatic generation
    • false = string, don't ask for automatic generation

Response

An object with the following attributes

  • success = 1 => operation was successfully executed

Example - PHP

https://github.com/celdotro/marketplace_examples/blob/master/Orders/29.finishOrderCombined.php

Example - JSON

{
  "request": {
   "orders_id": 1,
   "serie": "X",
   "nr_fact": 1,
   "awb": "X",
   "idAdresaRidicare": 1,
   "observations": "X",
   "products": [
    {
      "products_price": 1,
      "cantitate": 1,
      "tva": 1,
      "id_prod_com": 1,
      "deschidere_colet": 1,
      "status": 0
    }
   ] 
  },
  
  "response": {
    "success": 1
  }
}
⚠️ **GitHub.com Fallback** ⚠️