### Example: listShippingRules() call with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/RulesApi.md Example of calling listShippingRules() with bearerAuth. Requires vendor/autoload.php and a valid access token. The example sets up the API client and calls the method with sample parameters, printing the result or catching exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\RulesApi( // 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 ); $org_id = org_01HZX9K2QF; // string | Organization ID $page = 1; // int | Page number (1-based) $limit = 20; // int | Items per page (max 100) $brand_id = brnd_8f3kd92ld0; // string | Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand. $brand_scope = own; // string | How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context. $carrier_id = carr_01HZX9K2QF; // string | Filter by carrier. $search = Home delivery; // string | Search by rule name. try { $result = $apiInstance->listShippingRules($org_id, $page, $limit, $brand_id, $brand_scope, $carrier_id, $search); print_r($result); } catch (Exception $e) { echo 'Exception when calling RulesApi->listShippingRules: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: listCarriers() with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/CarriersApi.md Example usage of the CarriersApi->listCarriers method. Configure bearer token authorization, set up the API client, and call the method with optional parameters. The example prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\CarriersApi( // 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 ); $org_id = org_01HZX9K2QF; // string | Organization ID $page = 1; // int | Page number (1-based) $limit = 20; // int | Items per page (max 100) $brand_id = brnd_8f3kd92ld0; // string | Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand. $brand_scope = own; // string | How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context. $carrier_slug = gls; // string | Filter by carrier slug. $search = PostNord; // string | Search by carrier name. try { $result = $apiInstance->listCarriers($org_id, $page, $limit, $brand_id, $brand_scope, $carrier_slug, $search); print_r($result); } catch (Exception $e) { echo 'Exception when calling CarriersApi->listCarriers: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: calling listAddresses() with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/AddressesApi.md Example usage of the AddressesApi::listAddresses method. Configures Bearer (JWT) authorization, creates an API client, sets example parameters, and handles the response or exception. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\AddressesApi( // 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 ); $org_id = org_01HZX9K2QF; // string | Organization ID $page = 1; // int | Page number (1-based) $limit = 20; // int | Items per page (max 100) $type = sender; // string | Filter by address type (sender, pickup, return) $country_code = DK; // string | Filter by ISO 3166-1 alpha-2 country code. $search = Copenhagen; // string | Search by company name, description, contact or city. $brand_id = brnd_8f3kd92ld0; // string | Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand. $brand_scope = own; // string | How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context. try { $result = $apiInstance->listAddresses($org_id, $page, $limit, $type, $country_code, $search, $brand_id, $brand_scope); print_r($result); } catch (Exception $e) { echo 'Exception when calling AddressesApi->listAddresses: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: listOrgWebhookDeliveries with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/WebhooksApi.md Complete example showing how to call listOrgWebhookDeliveries with bearerAuth authorization. Requires an access token and optional page/limit parameters. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\WebhooksApi( // 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 ); $org_id = org_clx1a2b3c4; // string | Organization ID $webhook_id = wh_clx1a2b3c4; // string | Webhook ID $page = 1; // int | Page number (1-based) $limit = 20; // int | Items per page (max 100) try { $result = $apiInstance->listOrgWebhookDeliveries($org_id, $webhook_id, $page, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling WebhooksApi->listOrgWebhookDeliveries: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### PHP example using TokensApi::updateApiToken() Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/TokensApi.md Example that configures bearerAuth, creates a TokensApi client, and calls updateApiToken() with sample org_id and token_id. Prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\TokensApi( // 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 ); $org_id = org_4d8af01qw2; // string | Organization ID $token_id = tok_6e2fa83ij9; // string | API Token ID $update_api_token_request = new \Zippendo\Sdk\Model\UpdateApiTokenRequest(); // \Zippendo\Sdk\Model\UpdateApiTokenRequest try { $result = $apiInstance->updateApiToken($org_id, $token_id, $update_api_token_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling TokensApi->updateApiToken: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Install with Composer Source: https://github.com/zippendo/zippendo-php/blob/main/README.md Install the Zippendo PHP SDK via Composer. Requires PHP 8.1+ and Composer. ```sh composer require zippendo/zippendo-php ``` -------------------------------- ### Example: updateOrgWebhook() usage Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/WebhooksApi.md Example of calling updateOrgWebhook with bearer token authentication. Requires vendor/autoload.php and a configured access token. The example creates a WebhooksApi instance with a GuzzleHttp client and passes an UpdateOrgWebhookRequest object. It prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\WebhooksApi( // 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 ); $org_id = org_clx1a2b3c4; // string | Organization ID $webhook_id = wh_clx1a2b3c4; // string | Webhook ID $update_org_webhook_request = new \Zippendo\Sdk\Model\UpdateOrgWebhookRequest(); // \Zippendo\Sdk\Model\UpdateOrgWebhookRequest try { $result = $apiInstance->updateOrgWebhook($org_id, $webhook_id, $update_org_webhook_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling WebhooksApi->updateOrgWebhook: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Example: listOrgWebhooks() call Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/WebhooksApi.md Example usage of the WebhooksApi->listOrgWebhooks method. Configures bearer token authorization, creates the API client, sets parameters, and prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\WebhooksApi( // 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 ); $org_id = org_8f3kd92ld0; // string | Organization ID $page = 1; // int | Page number (1-based) $limit = 20; // int | Items per page (max 100) $brand_id = brnd_8f3kd92ld0; // string | Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand. $brand_scope = own; // string | How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context. $is_active = true; // string | Filter by active state. $search = fulfilment; // string | Search by webhook name or URL. try { $result = $apiInstance->listOrgWebhooks($org_id, $page, $limit, $brand_id, $brand_scope, $is_active, $search); print_r($result); } catch (Exception $e) { echo 'Exception when calling WebhooksApi->listOrgWebhooks: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### getOrg() usage example Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/OrgsApi.md Example of calling getOrg() with a resource ID. Requires Bearer (JWT) authorization. The example sets an access token, creates an OrgsApi instance with a GuzzleHttp client, and handles exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\OrgsApi( // 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 ); $id = clz9x8a7b0001; // string | Resource ID try { $result = $apiInstance->getOrg($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrgsApi->getOrg: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: listApiTokens() usage Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/TokensApi.md Example of calling listApiTokens() with bearerAuth. Requires a valid access token and optional parameters page (default 1) and limit (default 20, max 100). ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\TokensApi( // 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 ); $org_id = org_4d8af01qw2; // string | Organization ID $page = 1; // int | Page number (1-based) $limit = 20; // int | Items per page (max 100) try { $result = $apiInstance->listApiTokens($org_id, $page, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling TokensApi->listApiTokens: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Example: splitShipmentParcel() usage Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/ShipmentsApi.md Example of calling splitShipmentParcel with Bearer (JWT) authorization. Requires vendor/autoload.php and a GuzzleHttp client. The example sets an access token, creates the API instance, and handles exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\ShipmentsApi( // 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 ); $org_id = org_1a2b3c4d; // string | Organization identifier. $shipment_id = shp_4d9e7a2f; // string | Shipment identifier. $split_shipment_parcel_request = new \Zippendo\Sdk\Model\SplitShipmentParcelRequest(); // \Zippendo\Sdk\Model\SplitShipmentParcelRequest try { $result = $apiInstance->splitShipmentParcel($org_id, $shipment_id, $split_shipment_parcel_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling ShipmentsApi->splitShipmentParcel: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### listOrders() usage example with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/OrdersApi.md Complete example of calling listOrders() with bearer token authentication. Requires the Zippendo SDK and GuzzleHttp client. The example sets an access token, creates an OrdersApi instance, and calls listOrders() with sample parameters, printing the result or catching exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\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 ); $org_id = org_8f3kd92ld0; // string | Organization ID $page = 1; // int | Page number (1-based) $limit = 20; // int | Items per page (max 100) $brand_id = brnd_8f3kd92ld0; // string | Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand. $brand_scope = own; // string | How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context. $status = processing; // string | Order fulfillment status derived from its shipments. $order_channel_id = clz9k2f0a0001abcd1234efgh; // string | Filter by order channel ID. $search = Anna; // string | Search by order number or customer name/email. $filter = {"conjunction":"and","conditions":[{"id":"c_1","field":"status","operator":"in","value":["pending","processing"]}]}; // string | Advanced filter as a JSON-encoded definition: a `conjunction` (`and`/`or`) over `conditions`, each `{ id, field, operator, value }` or a nested group. Fields and operators per list are documented under Filtering lists in the API overview. An invalid filter returns 400 `FILTER_INVALID`. try { $result = $apiInstance->listOrders($org_id, $page, $limit, $brand_id, $brand_scope, $status, $order_channel_id, $search, $filter); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrdersApi->listOrders: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### verifyApiToken() usage example Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/TokensApi.md Example of calling verifyApiToken with bearerAuth (JWT) authorization. Requires a valid access token and a VerifyApiTokenRequest object. Prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\TokensApi( // 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 ); $verify_api_token_request = new \Zippendo\Sdk\Model\VerifyApiTokenRequest(); // \Zippendo\Sdk\Model\VerifyApiTokenRequest try { $result = $apiInstance->verifyApiToken($verify_api_token_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling TokensApi->verifyApiToken: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: testOrgWebhook with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/WebhooksApi.md Example usage of WebhooksApi->testOrgWebhook. Configure bearer token, create client, call method, and handle exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\WebhooksApi( // 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 ); $org_id = org_clx1a2b3c4; // string | Organization ID $webhook_id = wh_clx1a2b3c4; // string | Webhook ID try { $result = $apiInstance->testOrgWebhook($org_id, $webhook_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling WebhooksApi->testOrgWebhook: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### getOrgBranding() usage example Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/OrgsApi.md Example of calling getOrgBranding() with an organization ID. Requires Bearer (JWT) authorization. The example sets an access token, creates an OrgsApi instance with a GuzzleHttp client, and handles exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\OrgsApi( // 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 ); $org_id = org_8f3kd92ld0; // string | Organization ID try { $result = $apiInstance->getOrgBranding($org_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrgsApi->getOrgBranding: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: listAvailableCarriers() with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/CarrierCatalogApi.md Example usage of the listAvailableCarriers method. Requires a Bearer (JWT) token and an organization ID. Prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\CarrierCatalogApi( // 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 ); $org_id = org_01HZX9K2QF; // string | Organization ID try { $result = $apiInstance->listAvailableCarriers($org_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling CarrierCatalogApi->listAvailableCarriers: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### PHP example using CarriersApi::listCarrierProducts() Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/CarriersApi.md Example usage of the CarriersApi with bearerAuth (JWT) authorization. Requires a valid access token and organization/carrier IDs. Outputs the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\CarriersApi( // 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 ); $org_id = org_01HZX9K2QF; // string | Organization ID $carrier_id = carr_01HZX9K2QF; // string | Carrier ID try { $result = $apiInstance->listCarrierProducts($org_id, $carrier_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling CarriersApi->listCarrierProducts: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### connectCarrier() example Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/CarriersApi.md Connects a new carrier to the organization with its configuration. Requires Bearer (JWT) authorization. The example uses the default GuzzleHttp client and prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\CarriersApi( // 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 ); $org_id = org_01HZX9K2QF; // string | Organization ID $connect_carrier_request = new \Zippendo\Sdk\Model\ConnectCarrierRequest(); // \Zippendo\Sdk\Model\ConnectCarrierRequest try { $result = $apiInstance->connectCarrier($org_id, $connect_carrier_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling CarriersApi->connectCarrier: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### createShippingRule() example Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/RulesApi.md Creates a new shipping rule with conditions and carrier product for the organization. Requires Bearer (JWT) authorization. The example uses the default GuzzleHttp client and prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\RulesApi( // 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 ); $org_id = org_01HZX9K2QF; // string | Organization ID $create_shipping_rule_request = new \Zippendo\Sdk\Model\CreateShippingRuleRequest(); // \Zippendo\Sdk\Model\CreateShippingRuleRequest try { $result = $apiInstance->createShippingRule($org_id, $create_shipping_rule_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling RulesApi->createShippingRule: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Example: listShipments() with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/ShipmentsApi.md Example usage of listShipments() with Bearer (JWT) authorization. Configures the SDK with an access token, creates a ShipmentsApi instance, and calls listShipments() with various filter parameters. The example includes a try-catch block to handle exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\ShipmentsApi( // 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 ); $org_id = org_8f3kd92ld0; // string | Organization ID $page = 1; // int | Page number (1-based) $limit = 20; // int | Items per page (max 100) $brand_id = brnd_8f3kd92ld0; // string | Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand. $brand_scope = own; // string | How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context. $status = dispatched; // string | Filter by shipment status. $type = outbound; // string | Filter by direction. $search = SHIP-1042; // string | Search by shipment reference or parcel tracking number. $filter = {"conjunction":"and","conditions":[{"id":"c_1","field":"status","operator":"in","value":["pending","processing"]}]}; // string | Advanced filter as a JSON-encoded definition: a `conjunction` (`and`/`or`) over `conditions`, each `{ id, field, operator, value }` or a nested group. Fields and operators per list are documented under Filtering lists in the API overview. An invalid filter returns 400 `FILTER_INVALID`. try { $result = $apiInstance->listShipments($org_id, $page, $limit, $brand_id, $brand_scope, $status, $type, $search, $filter); print_r($result); } catch (Exception $e) { echo 'Exception when calling ShipmentsApi->listShipments: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: listCarrierProductServicePoints() with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/CarriersApi.md Example usage of the CarriersApi method. Requires a bearer token (JWT) for authorization. The method returns an array of service points and throws an exception on failure. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\CarriersApi( // 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 ); $org_id = org_01HZX9K2QF; // string | Organization ID $carrier_id = carr_01HZX9K2QF; // string | Carrier ID $product_id = PNL13; // string | Carrier product ID $list_carrier_product_service_points_request = new \Zippendo\Sdk\Model\ListCarrierProductServicePointsRequest(); // \Zippendo\Sdk\Model\ListCarrierProductServicePointsRequest try { $result = $apiInstance->listCarrierProductServicePoints($org_id, $carrier_id, $product_id, $list_carrier_product_service_points_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling CarriersApi->listCarrierProductServicePoints: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Example: deleteShippingRule() usage Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/RulesApi.md Example of deleting a shipping rule using the RulesApi. Requires a Bearer token for authorization and a GuzzleHttp client. The example prints the result or catches an exception. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\RulesApi( // 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 ); $org_id = org_01HZX9K2QF; // string | Organization ID $rule_id = rule_01HZX9K2QF; // string | Shipping Rule ID try { $result = $apiInstance->deleteShippingRule($org_id, $rule_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling RulesApi->deleteShippingRule: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### updateShipment() usage example with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/ShipmentsApi.md Complete example showing how to call updateShipment() with Bearer (JWT) authorization. Requires the GuzzleHttp client (optional, defaults to GuzzleHttp\Client) and a valid access token. The example prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\ShipmentsApi( // 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 ); $org_id = org_1a2b3c4d; // string | Organization identifier. $shipment_id = shp_4d9e7a2f; // string | Shipment identifier. $update_shipment_request = new \Zippendo\Sdk\Model\UpdateShipmentRequest(); // \Zippendo\Sdk\Model\UpdateShipmentRequest try { $result = $apiInstance->updateShipment($org_id, $shipment_id, $update_shipment_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling ShipmentsApi->updateShipment: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: listOrgBrands() usage Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/BrandsApi.md Example showing how to call listOrgBrands() with bearer token authentication. Requires the Guzzle HTTP client and the Zippendo SDK autoloader. The response is printed or an exception is caught. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\BrandsApi( // 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 ); $org_id = org_8f3kd92ld0; // string | Organization ID $include_archived = false; // string | Include archived brands in the response try { $result = $apiInstance->listOrgBrands($org_id, $include_archived); print_r($result); } catch (Exception $e) { echo 'Exception when calling BrandsApi->listOrgBrands: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### PHP example: deleteOrderChannel with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/OrderChannelsApi.md Example usage of the OrderChannelsApi deleteOrderChannel method. Requires a bearer token for authorization. The example sets the access token, creates the API client, and calls the method with sample org_id and channel_id values, printing the result or catching exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\OrderChannelsApi( // 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 ); $org_id = clz9k2f0a0000abcd0000zzzz; // string | Organization ID. $channel_id = clz9k2f0a0001abcd1234efgh; // string | Order channel ID. try { $result = $apiInstance->deleteOrderChannel($org_id, $channel_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderChannelsApi->deleteOrderChannel: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: getOrderChannel() usage Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/OrderChannelsApi.md Example of calling getOrderChannel() with bearer token authorization. Requires a valid organization ID and channel ID. Prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\OrderChannelsApi( // 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 ); $org_id = clz9k2f0a0000abcd0000zzzz; // string | Organization ID. $channel_id = clz9k2f0a0001abcd1234efgh; // string | Order channel ID. try { $result = $apiInstance->getOrderChannel($org_id, $channel_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderChannelsApi->getOrderChannel: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### PHP example using ShipmentsApi::fetchShipmentLabel Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/ShipmentsApi.md Example that configures Bearer (JWT) authorization and calls fetchShipmentLabel with org_id and shipment_id. Prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\ShipmentsApi( // 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 ); $org_id = org_1a2b3c4d; // string | Organization identifier. $shipment_id = shp_4d9e7a2f; // string | Shipment identifier. try { $result = $apiInstance->fetchShipmentLabel($org_id, $shipment_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling ShipmentsApi->fetchShipmentLabel: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: getOrgBrand with bearerAuth Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/BrandsApi.md Example usage of BrandsApi::getOrgBrand. Requires a bearer token and GuzzleHttp client. Prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\BrandsApi( // 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 ); $org_id = org_8f3kd92ld0; // string | Organization ID $brand_id = brnd_8f3kd92ld0; // string | Brand ID try { $result = $apiInstance->getOrgBrand($org_id, $brand_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling BrandsApi->getOrgBrand: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Example: trackShipment() usage Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/ShipmentsApi.md Example of calling trackShipment() with bearer token authentication. Requires org_id and shipment_id. Prints the result or catches exceptions. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\ShipmentsApi( // 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 ); $org_id = org_1a2b3c4d; // string | Organization identifier. $shipment_id = shp_4d9e7a2f; // string | Shipment identifier. try { $result = $apiInstance->trackShipment($org_id, $shipment_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling ShipmentsApi->trackShipment: ', $e->getMessage(), PHP_EOL; } ``` -------------------------------- ### Example: createOrderChannel() usage Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/OrderChannelsApi.md Example of calling createOrderChannel() with bearer token authentication. Requires a valid access token and an organization ID. The request body is a CreateOrderChannelRequest object. Outputs the result or an exception message. ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Zippendo\Sdk\Api\OrderChannelsApi( // 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 ); $org_id = org_8f3kd92ld0; // string | Organization ID $create_order_channel_request = new \Zippendo\Sdk\Model\CreateOrderChannelRequest(); // \Zippendo\Sdk\Model\CreateOrderChannelRequest try { $result = $apiInstance->createOrderChannel($org_id, $create_order_channel_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderChannelsApi->createOrderChannel: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Create resource clients Source: https://github.com/zippendo/zippendo-php/blob/main/README.md Instantiate API resource clients such as ShipmentsApi and OrdersApi. Each client takes an HTTP client and the configuration object. ```php $shipments = new Zippendo\Sdk\Api\ShipmentsApi(new GuzzleHttp\Client(), $config); $orders = new Zippendo\Sdk\Api\OrdersApi(new GuzzleHttp\Client(), $config); ``` -------------------------------- ### GET /orgs/{orgId}/shipments/{shipmentId} Source: https://github.com/zippendo/zippendo-php/blob/main/docs/Api/ShipmentsApi.md Get shipment. This endpoint retrieves details of a specific shipment. ```APIDOC ## GET /orgs/{orgId}/shipments/{shipmentId} ### Description Get shipment. ### Method GET ### Endpoint /orgs/{orgId}/shipments/{shipmentId} ### Parameters #### Path Parameters - **orgId** (string) - Required - Organization ID - **shipmentId** (string) - Required - Shipment ID ```