Prerequisites

You should have 

  • an user-account enabled for api access, order access and marketplace access
  • an api-client
  • at least one product-record stored in the Hublify PIM
  • at least one merchant with a product in the Hublify Marketplace

Merchant products & order inject

Although we recommand using the cart-functionality to create new orders for a shop, sometimes you might have to create them directly. This is also possible, if your order includes merchant-specific products.
Make sure, that you check and add the merchant-specific details for price, availability etc., if you add them directly to the order.
You need to specify at least the merchant-id (as fk_oi_mrch_id) for each item.

Request URL

https://{your hublify url}/api/eos_10/order_inject

Request parameter

{
    "fields": {
         "person": {
            "personid": "KABC0000123",               // You can provide your own unique customer-id here, if empty one will be autocreated
            "p_personid_external": "ABC000012",      // Provide an external unique customer-id here.
            "bday": "1973-01-22",
            "telephone": "+4940123456",
            "telephone_mobile": "+491601234567",
            "email": "max@muster.de"
        },
        "order": {                             
            "invoice_company": "",
            "invoice_gender": "male",            // Options: "male|female|diverse|company"
            "invoice_firstname": "Max",
            "invoice_lastname": "Muster",
            "invoice_addrextra": "",
            "invoice_street": "Sample Street",
            "invoice_housenr": "1b",
            "invoice_zip": "22222",
            "invoice_town": "Hamburg",
            "invoice_country": "DE",

            "orderitems": [                            // Array of all order items.
                {
                    "oi_pcode": "EK00001",             // Product-Code. This is the Hublify-internal Productcode
                    "fk_oi_mrch_id": 42,               // The Hublify-internal ID for the merchant. 
                    "oi_price_single_brutto": "5.55",  // The merchant-specific price for this item 
                    "oi_quantity": 1,                  // (optional, default: 1)
                }
            ]
        },
        "payment": {                                   // Details about Payments 
            "pys_method": "Remittance"                  
        }
    }
}

See API-Aufträge for other possible params.

Response

If your request was successful, you receive the current status and the hublify ids for this order and person.

{
    "status": true,
    "data": {
        "persid": "12345",                     // Hublify internal primary id for the customer
        "personid": "K00012345",               // Hublify internal customer-id created / assigned to.
        "oid": "123456",                       // Hublify internal primary id for the order   
        "orderid": "A00123456",                // Hublify internal order-id created.
        "o_orderid_external": null,            // NULL / empty, because no external order-id was provided in request.
        "order_state_code": "received",        // Hublify internal order-state code after order injection.
    }
}