Product

api/product endpoint documentation


New product

Description Creates new product for a given store. If the store_uuid is not explicitly passed during the call to the endpoint then the product will be assigned to the last created store in the account.
Endpoint url api/product/create
Method POST
Params
Required
Headers
Name Type Value Description
token string - The token obtained during the account creation call.
Data params
Name Type Value Description
name string - Name for the created product.
price decimal 0.00 - 10000.00 Price for the created product.
Optional
Data params
Name Type Value Description
store_uuid string - If the parameter is not given then the product will be assigned to the last created store in the account.
Success response

{
    "code": 200,
    "body": {
        "data": {
            "uuid": "e8c3fc13-5a24-6c2f-c6ca-8062bed1b142",
            "name": "test product 1",
            "store": {
                "uuid": "fdab1d05-6dc0-575d-8916-78e84ce8ccc2"
            }
        }
    }
}
Error response If wrong/non-existing store_uuid given:

{
    "code": 422,
    "body": {
        "data": [],
        "errors": {
            "store_id": [
                "The given object could not be found."
            ]
        }
    }
}

Get product

Description Returns product record for a given product_uuid.
Endpoint url api/product
Method GET
Params
Required
Headers
Name Type Value Description
token string - The token obtained during the account creation call.
Data params
Name Type Value Description
uuid string - -
Success response

{
    "code": 200,
    "body": {
        "data": {
            "uuid": "e8c3fc13-5a24-6c2f-c6ca-8062bed1b142",
            "name": "test product 1",
            "price": "10.00",
            "store": {
                "uuid": "fdab1d05-6dc0-575d-8916-78e84ce8ccc2"
            }
        }
    }
}
Error response If wrong/non-existing product_uuid given:

{
    "code": 404,
    "body": {
        "data": [],
        "errors": []
    }
}

https://clickstore.pl © 2018 / Wyklikaj Sklep Bez Pomocy Innych / Przycisk "Kup Teraz" z Koszykiem & Kreator Landing Page w Jednym.