Skip to content

be-lenka/deposco-php-sdk

Repository files navigation

Deposco Fulfillment - PHP SDK

Welcome to the Deposco API Reference! The Deposco API enables you to integrate your system with Deposco.

  • Integrate a product information system (PIM) by creating and retrieving data for items, packs, UPCs, and kits.
  • Set up warehouse data by creating facilities, zones, locations, and storage details.
  • Create inbound orders that can be received and outbound orders that can be fulfilled with Deposco warehouse management processes.

This reference provides details on available operations, endpoints, parameters, schemas, and responses. Example requests and responses are also available for you to use as a reference. You can copy the examples to use as a starting point for your own requests.

Review the guides to learn how the API is used in common business scenarios such as setting up the warehouse and integrating a Product Information Management (PIM) system.

When you're ready to get started, register for a developer account and then log in to create your application in the developer portal.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/be-lenka/deposco-php-sdk.git"
    }
  ],
  "require": {
    "be-lenka/deposco-php-sdk": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/BeLenka/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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

$config = \BeLenka\Deposco\Configuration::getDefaultConfiguration();

$refreshToken = '<refresh_token>';
$clientId = '<client_id>';
$secretId = '<secret_id>';

$token = new \BeLenka\Deposco\Auth($clientId, $secretId, $refreshToken, $config);
$token->authenticate();

$apiInstance = new \BeLenka\Deposco\Api\ItemsApi(
    // 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
);

// string | Code for the company (business unit) to which the resource is assigned. Optional if the application is restricted to one company.
$business_unit = '<business_unit>';

// string | ID that is returned in the links section of incomplete search results. Specify the search ID in this parameter to continue retrieving search results. Other search-related parameters are overridden by this parameter.
$search_id = '';

// string | Item number of the requested item.
$number = '';

// string | Name of the requested item.
$name = '';

// \DateTime | Search field for finding records created after the specified date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
$created_after = new \DateTime("2023-10-20T19:20:30+01:00");

// \DateTime | Search field for finding records updated after the specified date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
$updated_after = new \DateTime("2023-10-20T19:20:30+01:00");

// int | Number of records returned on each page of the search results. The default page size is 50.
$page_size = 50;

try {
    $result = $apiInstance->getItems($business_unit, $search_id, $number, $name, $created_after, $updated_after, $page_size);
    print_r($result);
} catch (\Exception $e) {
    echo 'Exception when calling ItemsApi->getItems: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.deposco.com/latest

Class Method HTTP request Description
AsynchronousOperationsApi getRequest GET /async/{requestId} Get the status of an asynchronous request
AsynchronousOperationsApi postBulkImport POST /async/bulkImports Perform a bulk import
BillableTransactionsApi getBillableTransactions GET /billing/transactions Get a list of billable transactions
CompaniesApi getCompanies GET /companies Get a list of companies
CompaniesApi getCompany GET /companies/{companyId} Get a company
CompaniesApi postCompanies POST /companies Create or update a company
ContainersApi getContainerById GET /containers/{containerId} Get a container
ContainersApi getContainers GET /containers Get a list of containers
ContainersApi postContainers POST /containers Create or update a container
CustomerOrdersApi getCustomerOrder GET /orders/customerOrders/{orderId} Get a customer order
CustomerOrdersApi getCustomerOrderLine GET /orders/customerOrders/{orderId}/customerOrderLines/{orderLineId} Get an order line for a customer order
CustomerOrdersApi getCustomerOrderLines GET /orders/customerOrders/{orderId}/customerOrderLines Get a list of order lines for a customer order
CustomerOrdersApi getCustomerOrders GET /orders/customerOrders Get a list of customer orders
CustomerOrdersApi postCustomerOrder POST /orders/customerOrders Create or update a customer order
CustomerReturnsApi getCustomerReturn GET /orders/customerReturns/{orderId} Get a customer return
CustomerReturnsApi getCustomerReturnLine GET /orders/customerReturns/{orderId}/orderLines/{orderLineId} Get an order line for a customer return
CustomerReturnsApi getCustomerReturnLines GET /orders/customerReturns/{orderId}/orderLines Get a list of order lines for a customer returns
CustomerReturnsApi getCustomerReturnOrderStatus GET /orders/customerReturns/{orderId}/status Get the status of a customer return
CustomerReturnsApi getCustomerReturns GET /orders/customerReturns Get a list of customer returns
CustomerReturnsApi postCustomerReturnOrderStatus POST /orders/customerReturns/{orderId}/status Updates the status of a customer return
CustomerReturnsApi postCustomerReturns POST /orders/customerReturns Create or update a customer return
CustomerReturnsApi postCustomerReturnsCancellation POST /orders/customerReturns/{orderId}/cancellations Cancel all or part of an customer return
CustomerReturnsApi updateCustomerReturnLine POST /orders/customerReturns/{orderId}/orderLines/{orderLineId} Update an order line for a customer return
FacilitiesApi getFacilities GET /facilities Get a list of facilities
FacilitiesApi getFacility GET /facilities/{facilityId} Get a facility
FacilitiesApi postFacility POST /facilities Create or update a facility
InboundTransferOrdersApi getInboundTransferOrder GET /orders/inboundTransferOrders/{orderId} Get an inbound transfer order
InboundTransferOrdersApi getInboundTransferOrderLine GET /orders/inboundTransferOrders/{orderId}/orderLines/{orderLineId} Get an order line for an inbound transfer order
InboundTransferOrdersApi getInboundTransferOrderLines GET /orders/inboundTransferOrders/{orderId}/orderLines Get a list of order lines for an inbound transfer order
InboundTransferOrdersApi getInboundTransferOrderStatus GET /orders/inboundTransferOrders/{orderId}/status Get the status of an inbound transfer order
InboundTransferOrdersApi getInboundTransferOrders GET /orders/inboundTransferOrders Get a list of inbound transfer orders
InboundTransferOrdersApi postInboundTransferOrderCancellation POST /orders/inboundTransferOrders/{orderId}/cancellations Cancel all or part of an inbound transfer order
InboundTransferOrdersApi postInboundTransferOrderStatus POST /orders/inboundTransferOrders/{orderId}/status Update the status of an inbound transfer order
InboundTransferOrdersApi postInboundTransferOrders POST /orders/inboundTransferOrders Create or update an inbound transfer order
InboundTransferOrdersApi updateInboundTransferOrderLine POST /orders/inboundTransferOrders/{orderId}/orderLines/{orderLineId} Update an order line for an inbound transfer order
InventoryApi getInventoryAdjustments GET /inventory/inventoryAdjustments Get a list of inventory adjustments
InventoryApi updateDiscreteInventory POST /inventory/facilities/{facilityId}/locations/{locationId}/updates Update inventory attributes
ItemsApi deleteItemUPC DELETE /items/{itemId}/upcs/{upcId} Delete an item UPC
ItemsApi deletePackUPC DELETE /items/{itemId}/packs/{packId}/upcs/{upcId} Delete a pack UPC
ItemsApi getHSCodes GET /items/{itemId}/hsCodes Get a list of HS codes for an item
ItemsApi getItem GET /items/{itemId} Get an item
ItemsApi getItemPack GET /items/{itemId}/packs/{packId} Get a pack for an item
ItemsApi getItemUPCs GET /items/{itemId}/upcs Get a list of item UPCs for an item
ItemsApi getItemVendors GET /items/{itemId}/itemVendors Get a list of item vendors for an item
ItemsApi getItems GET /items Get a list of items
ItemsApi getPackUPC GET /items/{itemId}/packs/{packId}/upcs Get a list of pack UPCs for an item
ItemsApi postItem POST /items Create or update an item
KitsApi deleteKitDetail DELETE /kitHeaders/{kitHeaderId}/kitDetails/{kitDetailId} Delete a kit detail
KitsApi getKitDetail GET /kitHeaders/{kitHeaderId}/kitDetails/{kitDetailId} Get a kit detail
KitsApi getKitDetails GET /kitHeaders/{kitHeaderId}/kitDetails Get a list of kit details
KitsApi getKitHeader GET /kitHeaders/{kitHeaderId} Get a kit header
KitsApi getKitHeaders GET /kitHeaders Get a list of kit headers
KitsApi postKitHeaders POST /kitHeaders Create or update a kit header
LocationsApi deleteStorageDetailFromALocation DELETE /locations/{locationId}/storageDetails/{storageDetailId} Delete a storage detail for a location
LocationsApi getLocationById GET /locations/{locationId} Get a location
LocationsApi getLocations GET /locations Get a list of locations
LocationsApi getStorageDetailById GET /locations/{locationId}/storageDetails/{storageDetailId} Get a storage detail for a location
LocationsApi getStorageDetailsForALocation GET /locations/{locationId}/storageDetails Get a list of storage details for a location
LocationsApi getZonesWithinLocation GET /locations/{locationId}/zones Get a list of zones for a location
LocationsApi postLocations POST /locations Create or update a location
OutboundShipmentsApi getOutboundShipment GET /shipments/outboundShipments/{shipmentId} Get an outbound shipment
OutboundShipmentsApi getOutboundShipmentLine GET /shipments/outboundShipments/{shipmentId}/shipmentLines/{shipmentLineId} Get a shipment line for an outbound shipment
OutboundShipmentsApi getOutboundShipmentLines GET /shipments/outboundShipments/{shipmentId}/shipmentLines Get a list of shipment lines for an outbound shipment
OutboundShipmentsApi getOutboundShipments GET /shipments/outboundShipments Get a list of outbound shipments
OutboundTransferOrdersApi getOutboundTransferOrder GET /orders/outboundTransferOrders/{orderId} Get an outbound transfer order
OutboundTransferOrdersApi getOutboundTransferOrderLine GET /orders/outboundTransferOrders/{orderId}/orderLines/{orderLineId} Get an order line for an outbound transfer order
OutboundTransferOrdersApi getOutboundTransferOrderLines GET /orders/outboundTransferOrders/{orderId}/orderLines Get a list of order lines for an outbound transfer order
OutboundTransferOrdersApi getOutboundTransferOrderStatus GET /orders/outboundTransferOrders/{orderId}/status Get the status of an outbound transfer order
OutboundTransferOrdersApi getOutboundTransferOrders GET /orders/outboundTransferOrders Get a list of outbound transfer orders
OutboundTransferOrdersApi postOutboundTransferOrderCancellation POST /orders/outboundTransferOrders/{orderId}/cancellations Cancel all or part of an outbound transfer order
OutboundTransferOrdersApi postOutboundTransferOrderStatus POST /orders/outboundTransferOrders/{orderId}/status Update the status of an outbound transfer order
OutboundTransferOrdersApi postOutboundTransferOrders POST /orders/outboundTransferOrders Create or update an outbound transfer order
OutboundTransferOrdersApi updateOutboundTransferOrderLine POST /orders/outboundTransferOrders/{orderId}/orderLines/{orderLineId} Update an order line for a outbound transfer order
PurchaseOrdersApi getPurchaseOrder GET /orders/purchaseOrders/{orderId} Get a purchase order
PurchaseOrdersApi getPurchaseOrderLine GET /orders/purchaseOrders/{orderId}/orderLines/{orderLineId} Get an order line for a purchase order
PurchaseOrdersApi getPurchaseOrderLines GET /orders/purchaseOrders/{orderId}/orderLines Get a list of order lines for a purchase order
PurchaseOrdersApi getPurchaseOrderOrderStatus GET /orders/purchaseOrders/{orderId}/status Get the status of a purchase order
PurchaseOrdersApi getPurchaseOrders GET /orders/purchaseOrders Get a list of purchase orders
PurchaseOrdersApi postPurchaseOrder POST /orders/purchaseOrders Create or update a purchase order
PurchaseOrdersApi postPurchaseOrderCancellation POST /orders/purchaseOrders/{orderId}/cancellations Cancel all or part of a purchase order
PurchaseOrdersApi postPurchaseOrderOrderStatus POST /orders/purchaseOrders/{orderId}/status Update the status of a purchase order
PurchaseOrdersApi updatePurchaseOrderLine POST /orders/purchaseOrders/{orderId}/orderLines/{orderLineId} Update an order line for a purchase order
ReceiptsApi getReceipts GET /receipts Get a list of receipts
SalesOrdersApi getSalesOrder GET /orders/salesOrders/{orderId} Get a sales order
SalesOrdersApi getSalesOrderLine GET /orders/salesOrders/{orderId}/orderLines/{orderLineId} Get an order line for a sales order
SalesOrdersApi getSalesOrderLines GET /orders/salesOrders/{orderId}/orderLines Get a list of order lines for a sales order
SalesOrdersApi getSalesOrderStatus GET /orders/salesOrders/{orderId}/status Get the status of a sales order
SalesOrdersApi getSalesOrders GET /orders/salesOrders Get a list of sales orders
SalesOrdersApi postSalesOrderCancellation POST /orders/salesOrders/{orderId}/cancellations Cancel all or part of a sales order
SalesOrdersApi postSalesOrderStatus POST /orders/salesOrders/{orderId}/status Update the status of a sales order
SalesOrdersApi postSalesOrders POST /orders/salesOrders Create or update a sales order
SalesOrdersApi updateSalesOrderLine POST /orders/salesOrders/{orderId}/orderLines/{orderLineId} Update an order line for a sales order
TradingPartnersApi deleteTradingPartnerParameter DELETE /tradingPartners/{tradingPartnerId}/parameters/{parameterId} Delete a trading partner parameter
TradingPartnersApi getTradingPartner GET /tradingPartners/{tradingPartnerId} Get a trading partner
TradingPartnersApi getTradingPartnerParameters GET /tradingPartners/{tradingPartnerId}/parameters Get a list of trading partner parameters
TradingPartnersApi getTradingPartnerSites GET /tradingPartners/{tradingPartnerId}/sites Get a list of trading partner sites
TradingPartnersApi getTradingPartners GET /tradingPartners Get a list of trading partners
TradingPartnersApi postTradingPartner POST /tradingPartners Create or update a trading partner
TripsApi getTripById GET /trips/{tripId} Get a trip
TripsApi getTrips GET /trips Get a list of trips
UsersApi getUser GET /users/{userId} Get a user
UsersApi getUsers GET /users Get a list of users
VendorReturnsApi getVendorReturn GET /orders/vendorReturns/{orderId} Get a vendor return
VendorReturnsApi getVendorReturnLine GET /orders/vendorReturns/{orderId}/orderLines/{orderLineId} Get an order line for a vendor return
VendorReturnsApi getVendorReturnLines GET /orders/vendorReturns/{orderId}/orderLines Get a list of order lines for a vendor return
VendorReturnsApi getVendorReturnStatus GET /orders/vendorReturns/{orderId}/status Get the status of a vendor return
VendorReturnsApi getVendorReturns GET /orders/vendorReturns Get a list of vendor returns
VendorReturnsApi postVendorReturnStatus POST /orders/vendorReturns/{orderId}/status Update the status of a vendor return
VendorReturnsApi postVendorReturns POST /orders/vendorReturns Create or update a vendor return
VendorReturnsApi postVendorReturnsCancellation POST /orders/vendorReturns/{orderId}/cancellations Cancel all or part of a vendor return
VendorReturnsApi updateVendorReturnLine POST /orders/vendorReturns/{orderId}/orderLines/{orderLineId} Update an order line for a vendor return
ZonesApi deleteLocationWithinAZone DELETE /zones/{zoneId}/locations/{locationId} Remove a location from a zone
ZonesApi getLocationsByZone GET /zones/{zoneId}/locations Get a list of locations for a zone
ZonesApi getZoneById GET /zones/{zoneId} Get a zone
ZonesApi getZones GET /zones Get a list of zones
ZonesApi postZones POST /zones Create or update a zone

Models

Authorization

Authentication schemes defined for the API:

oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://developer.deposco.com/applications/install?client_id={{client_id}}
  • Scopes:
    • items/read: Read items
    • items/write: Modify items
    • kits/read: Read kits
    • kits/write: Modify kits
    • tradingPartners/read: Read trading partners
    • tradingPartners/write: Modify trading partners
    • companies/read: Read companies
    • companies/write: Modify companies
    • facilities/read: Read facilities
    • facilities/write: Modify facilities
    • zones/read: Read zones
    • zones/write: Modify zones
    • locations/read: Read locations
    • locations/write: Modify locations
    • users/read: Read users
    • users/write: Modify users
    • salesOrders/read: Read sales orders
    • salesOrders/write: Modify sales orders
    • purchaseOrders/read: Read purchase orders
    • purchaseOrders/write: Modify purchase orders
    • outboundTransferOrders/read: Read outbound transfer orders
    • outboundTransferOrders/write: Modify outbound transfer orders
    • inboundTransferOrders/read: Read inbound transfer orders
    • inboundTransferOrders/write: Modify inbound transfer orders
    • customerReturns/read: Read customer returns
    • customerReturns/write: Modify customer returns
    • vendorReturns/read: Read vendor returns
    • vendorReturns/write: Modify vendor returns
    • customerOrders/read: Read customer orders
    • customerOrders/write: Modify customer orders
    • containers/read: Read containers
    • containers/write: Modify containers
    • trips/read: Read trips
    • trips/write: Modify trips
    • outboundShipments/read: Read outbound shipments
    • outboundShipments/write: Modify outbound shipments
    • receipts/read: Read receipts
    • receipts/write: Modify receipts
    • inventory/write: Modify inventory
    • inventoryAdjustments/read: Read inventory adjustments
    • itemDeliveryPromise/write: Request Delivery Promise per item
    • checkoutDeliveryPromise/write: Request Delivery Promise per shopping cart

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.2519
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen