/rest_api_v2_sdk_php

UltraCart REST API PHP Client

Primary LanguagePHPApache License 2.0Apache-2.0

SwaggerClient-php

This is the next generation UltraCart REST API...

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 2.0.0
  • Build date: 2017-05-16T07:35:10.973-04:00
  • Build package: class io.swagger.codegen.languages.PhpClientCodegen For more information, please visit http://www.ultracart.com

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/UltraCart/rest_api_v2_sdk_php.git"
    }
  ],
  "require": {
    "UltraCart/rest_api_v2_sdk_php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit lib/Tests

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure OAuth2 access token for authorization: ultraCartOauth
ultracart\v2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure API key authorization: ultraCartSimpleApiKey
ultracart\v2\Configuration::getDefaultConfiguration()->setApiKey('x-ultracart-simple-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// ultracart\v2\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-ultracart-simple-key', 'Bearer');

$api_instance = new ultracart\v2\Api\AutoorderApi();
$auto_order_oid = 56; // int | The auto order oid to retrieve.
$_expand = "_expand_example"; // string | The object expansion to perform on the result.  See documentation for examples

try {
    $result = $api_instance->autoOrderAutoOrdersAutoOrderOidGet($auto_order_oid, $_expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AutoorderApi->autoOrderAutoOrdersAutoOrderOidGet: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://secure.ultracart.com/rest/v2

Class Method HTTP request Description
AutoorderApi autoOrderAutoOrdersAutoOrderOidGet GET /auto_order/auto_orders/{auto_order_oid} Retrieve an auto order
AutoorderApi autoOrderAutoOrdersAutoOrderOidPut PUT /auto_order/auto_orders/{auto_order_oid} Update an auto order
AutoorderApi autoOrderAutoOrdersGet GET /auto_order/auto_orders Retrieve auto orders
ChargebackApi chargebackChargebacksChargebackDisputeOidDelete DELETE /chargeback/chargebacks/{chargeback_dispute_oid} Delete a chargeback
ChargebackApi chargebackChargebacksChargebackDisputeOidGet GET /chargeback/chargebacks/{chargeback_dispute_oid} Retrieve a chargeback
ChargebackApi chargebackChargebacksChargebackDisputeOidPut PUT /chargeback/chargebacks/{chargeback_dispute_oid} Update a chargeback
ChargebackApi chargebackChargebacksGet GET /chargeback/chargebacks Retrieve chargebacks
ChargebackApi chargebackChargebacksPost POST /chargeback/chargebacks Insert a chargeback
CheckoutApi checkoutBrowserKeyPut PUT /checkout/browser_key Setup Browser Application
CheckoutApi checkoutCartCartIdGet GET /checkout/cart/{cart_id} Get cart (by cart id)
CheckoutApi checkoutCartFinalizeOrderPost POST /checkout/cart/finalizeOrder Finalize Order
CheckoutApi checkoutCartGet GET /checkout/cart Get cart
CheckoutApi checkoutCartHandoffPost POST /checkout/cart/handoff Handoff cart
CheckoutApi checkoutCartProfileLoginPost POST /checkout/cart/profile/login Profile login
CheckoutApi checkoutCartProfileLogoutPost POST /checkout/cart/profile/logout Profile logout
CheckoutApi checkoutCartProfileRegisterPost POST /checkout/cart/profile/register Profile registration
CheckoutApi checkoutCartPut PUT /checkout/cart Update cart
CheckoutApi checkoutCartValidatePost POST /checkout/cart/validate Validate
CheckoutApi checkoutCityStatePost POST /checkout/city_state City/State for Zip
CheckoutApi checkoutRelatedItemsItemIdPost POST /checkout/relatedItems/{item_id} Related items (specific item)
CheckoutApi checkoutRelatedItemsPost POST /checkout/related_items Related items
CheckoutApi checkoutReturnReturnCodeGet GET /checkout/return/{return_code} Get cart (by return code)
CustomerApi customerCustomersCustomerProfileOidDelete DELETE /customer/customers/{customer_profile_oid} Delete a customer
CustomerApi customerCustomersCustomerProfileOidGet GET /customer/customers/{customer_profile_oid} Retrieve a customer
CustomerApi customerCustomersCustomerProfileOidPut PUT /customer/customers/{customer_profile_oid} Update a customer
CustomerApi customerCustomersGet GET /customer/customers Retrieve customers
CustomerApi customerCustomersPost POST /customer/customers Insert a customer
FulfillmentApi fulfillmentDistributionCentersDistributionCenterCodeAcknowledgementsPut PUT /fulfillment/distribution_centers/{distribution_center_code}/acknowledgements Acknowledge receipt of orders.
FulfillmentApi fulfillmentDistributionCentersDistributionCenterCodeInventoryPost POST /fulfillment/distribution_centers/{distribution_center_code}/inventory Update inventory
FulfillmentApi fulfillmentDistributionCentersDistributionCenterCodeOrdersGet GET /fulfillment/distribution_centers/{distribution_center_code}/orders Retrieve orders queued up for this distribution center.
FulfillmentApi fulfillmentDistributionCentersDistributionCenterCodeShipmentsPost POST /fulfillment/distribution_centers/{distribution_center_code}/shipments Mark orders as shipped
FulfillmentApi fulfillmentDistributionCentersGet GET /fulfillment/distribution_centers Retrieve distribution centers
ItemApi itemItemsGet GET /item/items Retrieve items
ItemApi itemItemsMerchantItemOidDelete DELETE /item/items/{merchant_item_oid} Delete an item
ItemApi itemItemsMerchantItemOidGet GET /item/items/{merchant_item_oid} Retrieve an item
ItemApi itemItemsMerchantItemOidPut PUT /item/items/{merchant_item_oid} Update an item
ItemApi itemItemsPost POST /item/items Create an item
ItemApi itemTempMultimediaPost POST /item/temp_multimedia Upload an image to the temporary multimedia.
OauthApi oauthRevokePost POST /oauth/revoke Revoke this OAuth application.
OauthApi oauthTokenPost POST /oauth/token Exchange authorization code for access token.
OrderApi orderOrdersGet GET /order/orders Retrieve orders
OrderApi orderOrdersOrderIdCancelPost POST /order/orders/{order_id}/cancel Cancel an order
OrderApi orderOrdersOrderIdDelete DELETE /order/orders/{order_id} Delete an order
OrderApi orderOrdersOrderIdGet GET /order/orders/{order_id} Retrieve an order
OrderApi orderOrdersOrderIdPut PUT /order/orders/{order_id} Update an order
OrderApi orderOrdersOrderIdResendReceiptPost POST /order/orders/{order_id}/resend_receipt Resend receipt
OrderApi orderOrdersOrderIdResendShipmentConfirmationPost POST /order/orders/{order_id}/resend_shipment_confirmation Resend shipment confirmation
WebhookApi webhookWebhooksGet GET /webhook/webhooks Retrieve webhooks
WebhookApi webhookWebhooksPost POST /webhook/webhooks Add a webhook
WebhookApi webhookWebhooksWebhookOidDelete DELETE /webhook/webhooks/{webhookOid} Delete a webhook
WebhookApi webhookWebhooksWebhookOidLogsGet GET /webhook/webhooks/{webhookOid}/logs Retrieve the log summaries
WebhookApi webhookWebhooksWebhookOidLogsRequestIdGet GET /webhook/webhooks/{webhookOid}/logs/{requestId} Retrieve an individual log
WebhookApi webhookWebhooksWebhookOidPut PUT /webhook/webhooks/{webhookOid} Update a webhook
WebhookApi webhookWebhooksWebhookOidReflowEventNamePost POST /webhook/webhooks/{webhookOid}/reflow/{eventName} Resend events to the webhook endpoint.

Documentation For Models

Documentation For Authorization

ultraCartBrowserApiKey

  • Type: API key
  • API key parameter name: x-ultracart-browser-key
  • Location: HTTP header

ultraCartOauth

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://secure.ultracart.com/rest/v2/oauth/authorize
  • Scopes:
  • auto_order_read: Allows you to read auto order information.
  • auto_order_write: Allows you to write auto order information.
  • chargeback_read: Allows you to read chargeback information.
  • chargeback_write: Allows you to write chargeback information.
  • checkout_read: Allows you to read checkout information.
  • checkout_write: Allows you to write checkout information.
  • customer_read: Allows you to read customer information.
  • customer_write: Allows you to write customer information.
  • fulfillment_read: Allows you to read fulfillment information.
  • fulfillment_write: Allows you to write fulfillment information.
  • order_read: Allows you to read order information.
  • order_write: Allows you to write order information.
  • item_read: Allows you to read item information.
  • item_write: Allows you to write item information.
  • webhook_read: Allows you to read webhook information.
  • webhook_write: Allows you to write webhook information.
  • ultrabooks_read: 1 of 2 required to use UltraBooks
  • ultrabooks_write: 2 of 2 required to use UltraBooks

ultraCartSimpleApiKey

  • Type: API key
  • API key parameter name: x-ultracart-simple-key
  • Location: HTTP header

Author

support@ultracart.com