Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Latest commit

 

History

History
180 lines (120 loc) · 5.88 KB

OrderApi.md

File metadata and controls

180 lines (120 loc) · 5.88 KB

Swagger\Client\OrderApi

All URIs are relative to https://demo.channelengine.net/api

Method HTTP request Description
orderCreate POST /v2/orders Create a new order in ChannelEngine.
orderCreate_0 POST /v2/orders/acknowledge Acknowledge an order. By acknowledging the order the merchant can confirm that the order has been imported. When acknowledging an order the merchant has to supply references that uniquely identify the order and the order lines. These references will be used in the other API calls.
orderGet GET /v2/orders/{merchantReference}
orderGetNew GET /v2/orders/new Fetch newly placed orders (order with status NEW).

orderCreate

\Swagger\Client\Model\OrderViewModel orderCreate($model)

Create a new order in ChannelEngine.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OrderApi();
$model = new \Swagger\Client\Model\CreateOrderViewModel(); // \Swagger\Client\Model\CreateOrderViewModel | 

try {
    $result = $api_instance->orderCreate($model);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApi->orderCreate: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
model \Swagger\Client\Model\CreateOrderViewModel

Return type

\Swagger\Client\Model\OrderViewModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

orderCreate_0

\Swagger\Client\Model\OrderViewModel orderCreate_0($model)

Acknowledge an order. By acknowledging the order the merchant can confirm that the order has been imported. When acknowledging an order the merchant has to supply references that uniquely identify the order and the order lines. These references will be used in the other API calls.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OrderApi();
$model = new \Swagger\Client\Model\OrderAcknowledgementViewModel(); // \Swagger\Client\Model\OrderAcknowledgementViewModel | Relations between the id's returned by ChannelEngine and the references              which the merchant uses

try {
    $result = $api_instance->orderCreate_0($model);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApi->orderCreate_0: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
model \Swagger\Client\Model\OrderAcknowledgementViewModel Relations between the id's returned by ChannelEngine and the references which the merchant uses

Return type

\Swagger\Client\Model\OrderViewModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

orderGet

\Swagger\Client\Model\OrderViewModel orderGet($merchant_reference)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OrderApi();
$merchant_reference = "merchant_reference_example"; // string | 

try {
    $result = $api_instance->orderGet($merchant_reference);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApi->orderGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
merchant_reference string

Return type

\Swagger\Client\Model\OrderViewModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

orderGetNew

\Swagger\Client\Model\OrderViewModel[] orderGetNew()

Fetch newly placed orders (order with status NEW).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OrderApi();

try {
    $result = $api_instance->orderGetNew();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApi->orderGetNew: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Swagger\Client\Model\OrderViewModel[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]