Skip to content

Latest commit

 

History

History
1123 lines (778 loc) · 39 KB

File metadata and controls

1123 lines (778 loc) · 39 KB

Keap\Core\V2\OrdersApi

All URIs are relative to https://api.keap.com/crm, except if the operation defines another base path.

Method HTTP request Description
applyCommissionOnOrderItems() POST /rest/v2/orders/{order_id}/items/{order_item_id}:applyCommission Apply Commission to an Order Item
applyTax() POST /rest/v2/orders/{order_id}:applyTax Apply Taxes on an Order
attachFileToOrder() POST /rest/v2/orders/{order_id}:attachFile Attach a File to an Order Invoice
createOrder() POST /rest/v2/orders Create an Order
createOrderCustomField() POST /rest/v2/orders/model/customFields Create an Order Custom Field
createOrderItem() POST /rest/v2/orders/{order_id}/items Create an Order Item
createPaymentForAnOrder() POST /rest/v2/orders/{order_id}/payments Create a Payment
deleteOrder() DELETE /rest/v2/orders/{order_id} Delete an Order
deleteOrderCustomField() DELETE /rest/v2/orders/model/customFields/{custom_field_id} Delete an Order Custom Field
deleteOrderItem() DELETE /rest/v2/orders/{order_id}/items/{order_item_id} Delete an Order Item
detachFileFromOrder() POST /rest/v2/orders/{order_id}:detachFile Detach a File from an Order Invoice
getOrder() GET /rest/v2/orders/{order_id} Retrieve an Order
listOrderPayments() GET /rest/v2/orders/{order_id}/payments Retrieve Order Payments
listOrders() GET /rest/v2/orders List orders
retrieveOrderCustomFieldModel() GET /rest/v2/orders/model Retrieve Order Custom Field Model
updateOrder() PATCH /rest/v2/orders/{order_id} Update an Order
updateOrderCustomField() PATCH /rest/v2/orders/model/customFields/{custom_field_id} Update an Order Custom Field
updateOrderItem() PATCH /rest/v2/orders/{order_id}/items/{order_item_id} Update an Order Item

applyCommissionOnOrderItems()

applyCommissionOnOrderItems($order_id, $order_item_id, $apply_commission_request): \Keap\Core\V2\Model\OrderItem

Apply Commission to an Order Item

Applies commission to an order item on an existing order.

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string
$order_item_id = 'order_item_id_example'; // string
$apply_commission_request = new \Keap\Core\V2\Model\ApplyCommissionRequest(); // \Keap\Core\V2\Model\ApplyCommissionRequest

try {
    $result = $apiInstance->applyCommissionOnOrderItems($order_id, $order_item_id, $apply_commission_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->applyCommissionOnOrderItems: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string
order_item_id string
apply_commission_request \Keap\Core\V2\Model\ApplyCommissionRequest

Return type

\Keap\Core\V2\Model\OrderItem

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

applyTax()

applyTax($order_id): \Keap\Core\V2\Model\OrderV2

Apply Taxes on an Order

Calculate taxes for a single Order for a given order id

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string

try {
    $result = $apiInstance->applyTax($order_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->applyTax: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string

Return type

\Keap\Core\V2\Model\OrderV2

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

attachFileToOrder()

attachFileToOrder($order_id, $file_operation_request): \Keap\Core\V2\Model\OrderV2

Attach a File to an Order Invoice

Attaches an uploaded File to an Order Invoice

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string
$file_operation_request = new \Keap\Core\V2\Model\FileOperationRequest(); // \Keap\Core\V2\Model\FileOperationRequest

try {
    $result = $apiInstance->attachFileToOrder($order_id, $file_operation_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->attachFileToOrder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string
file_operation_request \Keap\Core\V2\Model\FileOperationRequest

Return type

\Keap\Core\V2\Model\OrderV2

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

createOrder()

createOrder($rest_create_order_request): \Keap\Core\V2\Model\OrderV2

Create an Order

Creates a one time Order with Order items

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$rest_create_order_request = new \Keap\Core\V2\Model\RestCreateOrderRequest(); // \Keap\Core\V2\Model\RestCreateOrderRequest

try {
    $result = $apiInstance->createOrder($rest_create_order_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->createOrder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
rest_create_order_request \Keap\Core\V2\Model\RestCreateOrderRequest

Return type

\Keap\Core\V2\Model\OrderV2

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

createOrderCustomField()

createOrderCustomField($create_custom_field_request): \Keap\Core\V2\Model\CustomFieldMetaData

Create an Order Custom Field

Creates a custom field of the specified type and options to the Order object

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$create_custom_field_request = new \Keap\Core\V2\Model\CreateCustomFieldRequest(); // \Keap\Core\V2\Model\CreateCustomFieldRequest

try {
    $result = $apiInstance->createOrderCustomField($create_custom_field_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->createOrderCustomField: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_custom_field_request \Keap\Core\V2\Model\CreateCustomFieldRequest

Return type

\Keap\Core\V2\Model\CustomFieldMetaData

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

createOrderItem()

createOrderItem($order_id, $create_order_item_request): \Keap\Core\V2\Model\OrderItem

Create an Order Item

Creates an order item on an existing order

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string
$create_order_item_request = new \Keap\Core\V2\Model\CreateOrderItemRequest(); // \Keap\Core\V2\Model\CreateOrderItemRequest

try {
    $result = $apiInstance->createOrderItem($order_id, $create_order_item_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->createOrderItem: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string
create_order_item_request \Keap\Core\V2\Model\CreateOrderItemRequest

Return type

\Keap\Core\V2\Model\OrderItem

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

createPaymentForAnOrder()

createPaymentForAnOrder($order_id, $rest_create_payment_request): \Keap\Core\V2\Model\PaymentResult

Create a Payment

Creates a payment record. Alternatively, adds a record of historical or external payment of cash or credit card

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string
$rest_create_payment_request = new \Keap\Core\V2\Model\RestCreatePaymentRequest(); // \Keap\Core\V2\Model\RestCreatePaymentRequest

try {
    $result = $apiInstance->createPaymentForAnOrder($order_id, $rest_create_payment_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->createPaymentForAnOrder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string
rest_create_payment_request \Keap\Core\V2\Model\RestCreatePaymentRequest

Return type

\Keap\Core\V2\Model\PaymentResult

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

deleteOrder()

deleteOrder($order_id)

Delete an Order

Deletes an Order
Note: The Order must not have any transactions recorded to be available for deletion.

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string

try {
    $apiInstance->deleteOrder($order_id);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->deleteOrder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

deleteOrderCustomField()

deleteOrderCustomField($custom_field_id)

Delete an Order Custom Field

Deletes a Custom Field from the Order object

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$custom_field_id = 'custom_field_id_example'; // string

try {
    $apiInstance->deleteOrderCustomField($custom_field_id);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->deleteOrderCustomField: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
custom_field_id string

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

deleteOrderItem()

deleteOrderItem($order_id, $order_item_id)

Delete an Order Item

Deletes an order item on an existing order

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string
$order_item_id = 'order_item_id_example'; // string

try {
    $apiInstance->deleteOrderItem($order_id, $order_item_id);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->deleteOrderItem: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string
order_item_id string

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

detachFileFromOrder()

detachFileFromOrder($order_id, $file_operation_request): \Keap\Core\V2\Model\OrderV2

Detach a File from an Order Invoice

Detaches a File from an Order Invoice

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string
$file_operation_request = new \Keap\Core\V2\Model\FileOperationRequest(); // \Keap\Core\V2\Model\FileOperationRequest

try {
    $result = $apiInstance->detachFileFromOrder($order_id, $file_operation_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->detachFileFromOrder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string
file_operation_request \Keap\Core\V2\Model\FileOperationRequest

Return type

\Keap\Core\V2\Model\OrderV2

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

getOrder()

getOrder($order_id): \Keap\Core\V2\Model\OrderV2

Retrieve an Order

Retrieves a single Order for a given order id

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string

try {
    $result = $apiInstance->getOrder($order_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->getOrder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string

Return type

\Keap\Core\V2\Model\OrderV2

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

listOrderPayments()

listOrderPayments($order_id, $filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListOrderPaymentsResponse

Retrieve Order Payments

Retrieves a list of payments made against a given order, including historical or external payments of cash or credit card

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string
$filter = 'filter_example'; // string | Filter to apply, allowed fields are: - (String) `invoice_id` - (String) `payment_id` - (String) `amount` - (String) `pay_status` - (Boolean) `skip_commission`  You will need to apply the `==` operator to check the equality of one of the filters with your searched  word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=payment_id%3D%3D123` - `filter=pay_status%3D%3DAPPROVED` - `filter=invoice_id%3D%3D456%3Bskip_commission=true`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `invoice_id` - `payment_id` - `amount` - `pay_time` - `pay_status` - `skip_commission` - `last_updated_time`  One of the following directions: - `asc` - `desc`
$page_size = 0; // int | Total number of items to return per page
$page_token = 'page_token_example'; // string | Page token

try {
    $result = $apiInstance->listOrderPayments($order_id, $filter, $order_by, $page_size, $page_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->listOrderPayments: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string
filter string Filter to apply, allowed fields are: - (String) `invoice_id` - (String) `payment_id` - (String) `amount` - (String) `pay_status` - (Boolean) `skip_commission` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=payment_id%3D%3D123` - `filter=pay_status%3D%3DAPPROVED` - `filter=invoice_id%3D%3D456%3Bskip_commission=true` [optional]
order_by string Attribute and direction to order items. One of the following fields: - `invoice_id` - `payment_id` - `amount` - `pay_time` - `pay_status` - `skip_commission` - `last_updated_time` One of the following directions: - `asc` - `desc` [optional]
page_size int Total number of items to return per page [optional]
page_token string Page token [optional]

Return type

\Keap\Core\V2\Model\ListOrderPaymentsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

listOrders()

listOrders($filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListOrders

List orders

Retrieves a list of orders

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$filter = 'filter_example'; // string | Filter to apply, allowed fields are: - (String) `id` - Allowable operators: \"==\",\"<=\", \"<\", \">=\", \">\", \"!=\" - (List[String]) `ids` - (String) `product_id` - (String) `contact_id` - (String) `invoice_id` - (String) `invoice_xid` - (Boolean) `paid` - (String) `created_since_time` - (String) `created_until_time` - (String) `modified_since_time` - (String) `modified_until_time` - (String) `title` - Wildcard matching allowed - (String) `order_type` (Allowed values: `ONLINE`, `OFFLINE`) - (String) `shipping_locality` - (String) `shipping_region_code` - (String) `shipping_postal_code` - (String) `shipping_country_code`  You will need to apply the `==` operator (or other supported operators), to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=product_id%3D%3D123` - `filter=id%3C123` - `filter=ids%3D%3D1,10,4,24` - `filter=invoice_xid%3D%3Df411a79c-9a92-4960-91d9-656f910a25e8` - `filter=product_id%3D%3D123%3Bcontact_id%3D%3D567` - `filter=title%3D%3DOrder` - `filter=order_type%3D%3DONLINE` - `filter=shipping_locality%3D%3DPhoenix` - `filter=shipping_region_code%3D%3DIN-MH` - `filter=shipping_postal_code%3D%3D85001` - `filter=shipping_country_code%3D%3DIND`  For fields which allow wildcard matching, you may use the * wildcard character (or its encoded form %2A) for case-insensitive partial matching on text fields. Example of a valid pattern of wildcard usage: - `field==foo*` finds anything in `field` that begins with `foo`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `id` - `order_time` - `modification_time`  One of the following directions: - `asc` - `desc`
$page_size = 0; // int | Total number of items to return per page
$page_token = 'page_token_example'; // string | Page token

try {
    $result = $apiInstance->listOrders($filter, $order_by, $page_size, $page_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->listOrders: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
filter string Filter to apply, allowed fields are: - (String) `id` - Allowable operators: &quot;==&quot;,&quot;<=&quot;, &quot;<&quot;, &quot;>=&quot;, &quot;>&quot;, &quot;!=&quot; - (List[String]) `ids` - (String) `product_id` - (String) `contact_id` - (String) `invoice_id` - (String) `invoice_xid` - (Boolean) `paid` - (String) `created_since_time` - (String) `created_until_time` - (String) `modified_since_time` - (String) `modified_until_time` - (String) `title` - Wildcard matching allowed - (String) `order_type` (Allowed values: `ONLINE`, `OFFLINE`) - (String) `shipping_locality` - (String) `shipping_region_code` - (String) `shipping_postal_code` - (String) `shipping_country_code` You will need to apply the `==` operator (or other supported operators), to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=product_id%3D%3D123` - `filter=id%3C123` - `filter=ids%3D%3D1,10,4,24` - `filter=invoice_xid%3D%3Df411a79c-9a92-4960-91d9-656f910a25e8` - `filter=product_id%3D%3D123%3Bcontact_id%3D%3D567` - `filter=title%3D%3DOrder` - `filter=order_type%3D%3DONLINE` - `filter=shipping_locality%3D%3DPhoenix` - `filter=shipping_region_code%3D%3DIN-MH` - `filter=shipping_postal_code%3D%3D85001` - `filter=shipping_country_code%3D%3DIND` For fields which allow wildcard matching, you may use the * wildcard character (or its encoded form %2A) for case-insensitive partial matching on text fields. Example of a valid pattern of wildcard usage: - `field==foo*` finds anything in `field` that begins with `foo` [optional]
order_by string Attribute and direction to order items. One of the following fields: - `id` - `order_time` - `modification_time` One of the following directions: - `asc` - `desc` [optional]
page_size int Total number of items to return per page [optional]
page_token string Page token [optional]

Return type

\Keap\Core\V2\Model\ListOrders

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

retrieveOrderCustomFieldModel()

retrieveOrderCustomFieldModel(): \Keap\Core\V2\Model\ObjectModel

Retrieve Order Custom Field Model

Gets the custom fields for the Order object

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->retrieveOrderCustomFieldModel();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->retrieveOrderCustomFieldModel: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Keap\Core\V2\Model\ObjectModel

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

updateOrder()

updateOrder($order_id, $update_order_request, $update_mask): \Keap\Core\V2\Model\OrderV2

Update an Order

Updates an Order

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string
$update_order_request = new \Keap\Core\V2\Model\UpdateOrderRequest(); // \Keap\Core\V2\Model\UpdateOrderRequest
$update_mask = NULL; // mixed | An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped.

try {
    $result = $apiInstance->updateOrder($order_id, $update_order_request, $update_mask);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->updateOrder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string
update_order_request \Keap\Core\V2\Model\UpdateOrderRequest
update_mask mixed An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. [optional]

Return type

\Keap\Core\V2\Model\OrderV2

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

updateOrderCustomField()

updateOrderCustomField($custom_field_id, $update_custom_field_meta_data_request, $update_mask): \Keap\Core\V2\Model\CustomFieldMetaData

Update an Order Custom Field

Updates a custom field of the specified type and options to the Order object

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$custom_field_id = 'custom_field_id_example'; // string
$update_custom_field_meta_data_request = new \Keap\Core\V2\Model\UpdateCustomFieldMetaDataRequest(); // \Keap\Core\V2\Model\UpdateCustomFieldMetaDataRequest
$update_mask = NULL; // mixed | An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped.

try {
    $result = $apiInstance->updateOrderCustomField($custom_field_id, $update_custom_field_meta_data_request, $update_mask);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->updateOrderCustomField: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
custom_field_id string
update_custom_field_meta_data_request \Keap\Core\V2\Model\UpdateCustomFieldMetaDataRequest
update_mask mixed An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. [optional]

Return type

\Keap\Core\V2\Model\CustomFieldMetaData

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

updateOrderItem()

updateOrderItem($order_id, $order_item_id, $update_order_item_request, $update_mask): \Keap\Core\V2\Model\OrderItem

Update an Order Item

Updates an Order Item

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\OrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order_id = 'order_id_example'; // string
$order_item_id = 'order_item_id_example'; // string
$update_order_item_request = new \Keap\Core\V2\Model\UpdateOrderItemRequest(); // \Keap\Core\V2\Model\UpdateOrderItemRequest
$update_mask = NULL; // mixed | An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped.

try {
    $result = $apiInstance->updateOrderItem($order_id, $order_item_id, $update_order_item_request, $update_mask);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->updateOrderItem: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_id string
order_item_id string
update_order_item_request \Keap\Core\V2\Model\UpdateOrderItemRequest
update_mask mixed An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. [optional]

Return type

\Keap\Core\V2\Model\OrderItem

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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