christian71-stack/otto-merch-api

1.2.5 2023-12-13 16:52 UTC

README

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

  • API version: 1.0.5
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Requirements

PHP 7.3 and later

Installation & Usage

Composer

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

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/christian71-stack/otto-merch-api
.git"
    }
  ]
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

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

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

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


$apiInstance = new cbdesk\otto\Client\Api\OrdersV4Api(
    // 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
);
$sales_order_id = "sales_order_id_example"; // string | The salesOrderId of the order
$position_item_id = array("position_item_id_example"); // string[] | The positionItemIds of the order to cancel

try {
    $apiInstance->ordersV4CancelPartnerOrderPositionItems($sales_order_id, $position_item_id);
} catch (Exception $e) {
    echo 'Exception when calling OrdersV4Api->ordersV4CancelPartnerOrderPositionItems: ', $e->getMessage(), PHP_EOL;
}


$apiInstance = new cbdesk\otto\Client\Api\OrdersV4Api(
    // 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
);
$sales_order_id = array("sales_order_id_example"); // string[] | The salesOrderIds of the orders to cancel

try {
    $apiInstance->ordersV4CancelPartnerOrders($sales_order_id);
} catch (Exception $e) {
    echo 'Exception when calling OrdersV4Api->ordersV4CancelPartnerOrders: ', $e->getMessage(), PHP_EOL;
}


$apiInstance = new cbdesk\otto\Client\Api\OrdersV4Api(
    // 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
);
$from_date = "from_date_example"; // string | Defines earliest change date (ISO 8601) the returned orders should have
$from_order_date = "from_order_date_example"; // string | Only orders newer than the date specified (ISO 8601) will be returned
$to_order_date = "to_order_date_example"; // string | Only orders older than the date specified (ISO 8601) will be returned
$fulfillment_status = "fulfillment_status_example"; // string | <br>ANNOUNCED: Orders with at least one position item in state ANNOUNCED<br>PROCESSABLE: Orders with at least one position item in state PROCESSABLE and none in ANNOUNCED<br>SENT: Orders with at least one position item in state SENT and none in either ANNOUNCED or PROCESSABLE<br>RETURNED: Orders with at least one position item in state RETURNED and none in either ANNOUNCED, PROCESSABLE, or SENT<br>CANCELLED_BY_PARTNER: Orders with at least one position item in state CANCELLED_BY_PARTNER<br>CANCELLED_BY_MARKETPLACE: Orders with at least one position item in state CANCELLED_BY_MARKETPLACE<br><br>If no state is provided, orders in all possible states are returned.<br>Several values can be passed; it will return a combination of these states without duplicates. Also see parameter 'mode'.<br><br>Example: ?fulfillmentStatus=PROCESSABLE&fulfillmentStatus=CANCELLED_BY_MARKETPLACE
$limit = 128; // int | The maximum amount of orders to return
$order_direction = "ASC"; // string | Sort result by 'orderColumnType' in ASCending or DESCending order
$order_column_type = "ORDER_LIFECYCLE_DATE"; // string | The column on which to apply 'orderDirection' parameter
$mode = "BUCKET"; // string | In search mode AT_LEAST_ONE orders with at least one  position item in given 'fulfillmentStatus' will always be returned
$nextcursor = "nextcursor_example"; // string | Cursor for paging requests. If a next cursor is provided, the only other request parameter being considered is 'limit'<br><br>Note: Only the cursor string is required - not the whole link

try {
    $result = $apiInstance->ordersV4FindPartnerOrders($from_date, $from_order_date, $to_order_date, $fulfillment_status, $limit, $order_direction, $order_column_type, $mode, $nextcursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersV4Api->ordersV4FindPartnerOrders: ', $e->getMessage(), PHP_EOL;
}


$apiInstance = new cbdesk\otto\Client\Api\OrdersV4Api(
    // 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_number = "order_number_example"; // string | 

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


$apiInstance = new cbdesk\otto\Client\Api\OrdersV4Api(
    // 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
);
$sales_order_id = "sales_order_id_example"; // string | 

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

Documentation for API Endpoints

All URIs are relative to https://api.otto.market

Class Method HTTP request Description
OrdersV4Api ordersV4CancelPartnerOrderPositionItems POST /v4/orders/{salesOrderId}/positionItems/{positionItemId}/cancellation Cancel specific position items of an order
OrdersV4Api ordersV4CancelPartnerOrders POST /v4/orders/{salesOrderId}/cancellation Cancel all position items of an order
OrdersV4Api ordersV4FindPartnerOrders GET /v4/orders List of orders filtered by fulfillment state
OrdersV4Api ordersV4GetPartnerOrderByOrderNumber GET /v4/orders/{orderNumber} Get an order via order number
OrdersV4Api ordersV4GetPartnerOrderBySalesOrderId GET /v4/orders/{salesOrderId} Get an order via sales order id
PriceReductionsV1Api priceReductionsV1ApplyPriceReduction POST /v1/price-reductions Apply price reduction for a positionItemId
PriceReductionsV1Api priceReductionsV1GetAllReductionsForPartner GET /v1/price-reductions Get all priceReductions
ProductsV2Api productsV2CreateOrUpdateProductVariations POST /v2/products Create or update product variations
ProductsV2Api productsV2FailedByProcessId GET /v2/products/update-tasks/{processUuid}/failed List failed products of a product data delivery
ProductsV2Api productsV2GetActiveStatus GET /v2/products/active-status Read active status
ProductsV2Api productsV2GetBrands GET /v2/products/brands List of allowed brands
ProductsV2Api productsV2GetCategoryGroups GET /v2/products/categories Read product categories
ProductsV2Api productsV2GetContentChanges GET /v2/products/{sku}/content-changes Read content changes for a single product variation
ProductsV2Api productsV2GetContentChanges2 GET /v2/products/content-changes Read content changes within time period
ProductsV2Api productsV2GetMarketPlaceStatus GET /v2/products/{sku}/marketplace-status Read marketplace status for a single product variation
ProductsV2Api productsV2GetMarketPlaceStatusList GET /v2/products/marketplace-status Read marketplace status of product variations
ProductsV2Api productsV2GetPartnerProducts GET /v2/products Read product variations
ProductsV2Api productsV2GetProductVariation GET /v2/products/{sku} Read a single product variation
ProductsV2Api productsV2GetProductVariationPrice GET /v2/products/{sku}/prices Read product variations prices
ProductsV2Api productsV2GetProductVariationPrices GET /v2/products/prices Read product variations prices
ProductsV2Api productsV2GetVariationActiveStatus GET /v2/products/{sku}/active-status Read the active status of a single product variation
ProductsV2Api productsV2ProgressByProcessId GET /v2/products/update-tasks/{processUuid} Request the results of a product data delivery
ProductsV2Api productsV2SucceededByProcessId GET /v2/products/update-tasks/{processUuid}/succeeded List succeeded products of a product data delivery
ProductsV2Api productsV2UnchangedByProcessId GET /v2/products/update-tasks/{processUuid}/unchanged List unchanged products of a product data delivery
ProductsV2Api productsV2UpdateActiveStatus POST /v2/products/active-status Update active status
ProductsV2Api productsV2UpdateProductVariationPrices POST /v2/products/prices Update product variation prices
QuantitiesV2Api quantitiesV2GetAvailableQuantities GET /v2/quantities Get available quantities for a specific Partner (Upto 200 per request).
QuantitiesV2Api quantitiesV2GetAvailableQuantityBySku GET /v2/quantities/{sku} Get available quantity for a specific Sku
QuantitiesV2Api quantitiesV2StoreAvailableQuantitiesUsingPOST POST /v2/quantities Update the available quantity for a specific SKU (up to 200 SKUs per request)
ReceiptsV2Api receiptsV2GetReceiptPdfUsingGET3 GET /v2/receipts/{receiptNumber}.pdf Get the PDF document of a specific receipt by receipt number.
ReceiptsV2Api receiptsV2GetReceiptUsingGET5 GET /v2/receipts/{receiptNumber} Get a specific receipt for the given receipt number as JSON object
ReceiptsV2Api receiptsV2GetReceiptsUsingGET5 GET /v2/receipts Get all receipts as list of JSON objects
ReturnsV2Api returnsV2GetPositionItemsForUsingGETV2 GET /v2/returns Get all the items filtered on return status
ReturnsV2Api returnsV2ReceiveAcceptedReturnsV2UsingPOSTV2 POST /v2/returns/acceptance Accept the return for a sent position item (up to 200 items per request)
ReturnsV2Api returnsV2ReceiveRejectedReturnsV2UsingPOSTV2 POST /v2/returns/rejection Reject the return for a sent position item (up to 200 items per request)
ShipmentsV1Api shipmentsV1AppendPositionItemsByCarrierAndTrackingNumberUsingPOST POST /v1/shipments/carriers/{carrier}/trackingnumbers/{trackingNumber}/positionitems Correct an existing shipment (add sent items) by carrier and tracking number.
ShipmentsV1Api shipmentsV1AppendPositionItemsUsingPOST POST /v1/shipments/{shipmentId}/positionitems Correct an existing shipment (add sent items) by shipment ID.
ShipmentsV1Api shipmentsV1CreatedAndSentShipmentUsingPOST POST /v1/shipments Create a shipment and mark the position items as sent.
ShipmentsV1Api shipmentsV1ListShipmentsUsingGET GET /v1/shipments Retrieve shipments.
ShipmentsV1Api shipmentsV1ShipmentByCarrierAndTrackingNumberUsingGET GET /v1/shipments/carriers/{carrier}/trackingnumbers/{trackingNumber} Retrieve shipment by carrier and tracking number.
ShipmentsV1Api shipmentsV1ShipmentUsingGET GET /v1/shipments/{shipmentId} Retrieve shipment by shipment ID.

Documentation For Models

Documentation For Authorization

JWT

  • Type: HTTP bearer authentication

Author