This function creates a shopping cart with which the system sends an order to the cPanel Store. Typically, the system will send shopping cart orders for SSL certificates to UAPI’s Market::request_ssl_certificates
function.
access required | string The access token to connect to the provider. Example: |
item required | Array of The items to add to the shopping cart. Note: The value is a JSON string. This object has one required key, The other keys/values in this object vary depending on the provider. Example: |
provider required | string The cPanel Market provider’s name. Example: |
url required | string The location to which the provider directs the user after the checkout process is complete. Example: |
HTTP Request was successful.
apiversion | integer The version of the API. |
func | string The name of the method called. |
module | string The name of the module called. |
object |
uapi --output=jsonpretty \ --user=username \ Market \ create_shopping_cart \ provider='cPStore' \ access_token='1a676e6f-99fc-11e6-9ab6-e60a769b73bc' \ url_after_checkout='http://www.example.com/thenextplace' \ item='{"product_id":123456,"provider-specfic-key":"provider-specfic-value","another-provider-specfic-key":"another-provider-specfic-value"}' item='{"product_id":123457,"provider-specfic-key":"provider-specfic-value","another-provider-specfic-key":"another-provider-specfic-value"}'
{- "apiversion": 3,
- "func": "create_shopping_cart",
- "module": "Market",
- "result": {
- "data": {
- "order_id": "8765309",
- "order_items": [
- { }
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}