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
PHP 7.3 and later
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
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
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;
}
?>
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. |
- APIErrorResponsePriceReductionsV1
- APIResponsePriceReductionsV1
- AcceptedPartnerReturnV2ReturnsV2
- AcceptedPriceReductionResponsePriceReductionsV1
- AcceptedReturnMultiStatusResponseReturnsV2
- AcceptedStatusDataReturnsV2
- ActiveStatusListRequestProductsV2
- ActiveStatusListResponseProductsV2
- ActiveStatusProductsV2
- AdditionalRequirementProductsV2
- AddressOrdersV4
- AddressShipmentsV1
- AllOfLineItemReceiptsV2PriceToPay
- AllOfLineItemReceiptsV2Total
- AllOfLineItemReceiptsV2TotalDiscount
- AllOfLineItemReceiptsV2UnitPrice
- AllOfPartialRefundReceiptsV2PartialRefundAmount
- AllOfPartnerPriceReductionRequestPriceReductionsV1PriceReduction
- AllOfPriceReductionDetailPriceReductionsV1PriceReduction
- AllOfPriceReductionResponsePriceReductionsV1InvoicePrice
- AllOfPriceReductionResponsePriceReductionsV1TotalPriceReduction
- AllOfServicePositionInfoReceiptsV2Total
- AllOfServicePositionInfoReceiptsV2UnitPrice
- AllOfShippingFeeReceiptsV2Price
- AllOfTotalReceiptsV2AmountDue
- AllOfTotalReceiptsV2Gross
- AllOfTotalReceiptsV2Net
- AmountOrdersV4
- AnnouncedStatusDataReturnsV2
- ApiErrorResponseReturnsV2
- ApiErrorResponseV2QuantitiesV2
- ApiErrorReturnsV2
- ApiErrorV2QuantitiesV2
- AttributeDefinitionProductsV2
- AttributeProductsV2
- AvailableQuantityRequestDTOV2QuantitiesV2
- AvailableQuantityResponseDTOV2QuantitiesV2
- AvailableQuantityResponseV2QuantitiesV2
- AvailableQuantityResponseV2QuantitiesV2Resources
- AvailableQuantitySingleResponseDTOV2QuantitiesV2
- BadRequestAddPositionItemByShipmentIdShipmentsV1
- BadRequestAddPositionItemByTrackingNumberShipmentsV1
- BadRequestShipmentsV1
- BrandProductsV2
- CategoryGroupProductsV2
- CategoryGroupsProductsV2
- ConditionProductsV2
- ConflictAddPositionItemByShipmentIdShipmentsV1
- ConflictAddPositionItemByTrackingNumberShipmentsV1
- ConflictPositionItemIdPriceReductionsV1
- ConflictShipmentsV1
- ContentChangeProductsV2
- ContentChangesApiResultProductsV2
- CreateShipmentRequestShipmentsV1
- CreateShipmentResponseShipmentsV1
- CustomerReceiptsV2
- DeliveryAddressReceiptsV2
- DeliveryProductsV2
- DiscountDetailsReceiptsV2
- ErrorDescriptionShipmentsV1
- ForbiddenApplyPriceReductionPriceReductionsV1
- ForbiddenGetPriceReductionPriceReductionsV1
- ForbiddenGetShipmentByShipmentIdShipmentsV1
- ForbiddenGetShipmentByTrackingNumberShipmentsV1
- InitialDeliveryFeeOrdersV4
- InitialDiscountOrdersV4
- InternalServerErrorAddPositionItemByShipmentIdShipmentsV1
- InternalServerErrorAddPositionItemByTrackingNumberShipmentsV1
- InternalServerErrorGetShipmentByShipmentIdShipmentsV1
- InternalServerErrorGetShipmentByTrackingNumberShipmentsV1
- InternalServerErrorGetShipmentListShipmentsV1
- InternalServerErrorShipmentsV1
- LineItemReceiptsV2
- LinkOrdersV4
- LinkPriceReductionsV1
- LinkProductsV2
- LinkQuantitiesV2
- LinkReceiptsV2
- LinkRelationProductsV2
- LinkReturnsV2
- LinkShipmentsV1
- LogisticsProductsV2
- MarketPlaceStatusApiResultProductsV2
- MarketPlaceStatusErrorProductsV2
- MarketPlaceStatusInformationProductsV2
- MarketPlaceStatusLinkProductsV2
- MarketPlaceStatusProductsV2
- MediaAssetProductsV2
- MisdirectedStatusDataReturnsV2
- MonetaryAmountProductsV2
- NormPriceInfoProductsV2
- NotFoundAddPositionItemByShipmentIdShipmentsV1
- NotFoundAddPositionItemByTrackingNumberShipmentsV1
- NotFoundGetShipmentByShipmentIdShipmentsV1
- NotFoundGetShipmentByTrackingNumberShipmentsV1
- NotFoundPositionItemIdPriceReductionsV1
- NotFoundPriceReductionForPositionItemIdPriceReductionsV1
- OrderLifecycleInformationOrdersV4
- PackingUnitProductsV2
- PartialRefundReceiptsV2
- PartnerOrderListOrdersV4
- PartnerOrderOrdersV4
- PartnerPriceReductionRequestPriceReductionsV1
- PartnerReceiptsV2
- PayloadTooLargeApiErrorResponseV2QuantitiesV2
- PaymentOrdersV4
- PositionItemListReturnsV2
- PositionItemOrdersV4
- PositionItemReturnsV2
- PositionItemShipmentsV1
- PriceApiResultProductsV2
- PriceReductionDetailPriceReductionsV1
- PriceReductionResponsePriceReductionsV1
- PriceReductionsResponsePriceReductionsV1
- PricingProductsV2
- ProductDescriptionProductsV2
- ProductLinkProductsV2
- ProductOrdersV4
- ProductProcessProgressProductsV2
- ProductProcessResultLinkProductsV2
- ProductProcessResultProductsV2
- ProductProcessTaskErrorProductsV2
- ProductProcessTaskResultProductsV2
- ProductVariationApiResultProductsV2
- ProductVariationProductsV2
- ReceiptReceiptsV2
- ReceiptsListReceiptsV2
- RejectedPartnerReturnV2ReturnsV2
- RejectedPositionItemReturnsV2
- RejectedReturnMultiStatusResponseReturnsV2
- RejectedStatusDataReturnsV2
- ReturnTrackingKeyReturnsV2
- ReturnTrackingKeyShipmentsV1
- ReturnedItemStatusDataReturnsV2
- ReturnedPositionItemReturnsV2
- SaleProductsV2
- ServicePositionInfoReceiptsV2
- ServicePositionItemInfoReceiptsV2
- ShipmentListShipmentsV1
- ShipmentShipmentsV1
- ShipmentWithMinimumDetailsShipmentsV1
- ShippingCostReceiptsV2
- ShippingFeeReceiptsV2
- SkuPricingProductsV2
- TotalReceiptsV2
- TrackingInfoOrdersV4
- TrackingKeyShipmentsV1
- UnauthenticatedShipmentsV1
- UpdateQuantityMultiStatusResponseQuantitiesV2
- Type: HTTP bearer authentication