承接 toppy/sendcloud-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

toppy/sendcloud-client

最新稳定版本:0.1.1

Composer 安装命令:

composer require toppy/sendcloud-client

包简介

Complete Sendcloud API v3 specification - merged from official Stoplight documentation bundles

README 文档

README

Complete Sendcloud API v3 specification - merged from official Stoplight documentation bundles

For more information, please visit https://www.sendcloud.dev.

Installation & Usage

Requirements

PHP 7.2 and later.

Composer

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

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

Then run composer install

Your project is free to choose the http client of your choice Please require packages that will provide http client functionality: https://packagist.org/providers/psr/http-client-implementation https://packagist.org/providers/php-http/async-client-implementation https://packagist.org/providers/psr/http-factory-implementation

As an example:

composer require guzzlehttp/guzzle php-http/guzzle7-adapter http-interop/http-factory-guzzle

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/toppy/sendcloud-client/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure HTTP basic authorization: HTTPBasicAuth
$config = Toppy\Sendcloud\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Toppy\Sendcloud\Api\CarrierSupportContactsApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | Support contact id

try {
    $apiInstance->scPublicV3DsfDeleteCarrierSupportContacts($id);
} catch (Exception $e) {
    echo 'Exception when calling CarrierSupportContactsApi->scPublicV3DsfDeleteCarrierSupportContacts: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://account.sendcloud.com

Class Method HTTP request Description
CarrierSupportContactsApi scPublicV3DsfDeleteCarrierSupportContacts DELETE /dsf/carrier-support-contacts/{id} Delete carrier support contact
CarrierSupportContactsApi scPublicV3DsfGetCarrierSupportContacts GET /dsf/carrier-support-contacts Get carrier support contacts
CarrierSupportContactsApi scPublicV3DsfPatchCarrierSupportContacts PATCH /dsf/carrier-support-contacts/{id} Update carrier support contact
CarrierSupportContactsApi scPublicV3DsfPostCarrierSupportContacts POST /dsf/carrier-support-contacts Create carrier support contact
CompatShippingOptionsApi scPublicV3ScpPostCompatShippingOptions POST /compat/shipping-options Retrieve a list of shipping options
ContractsApi scPublicV3ScpDeleteContract DELETE /contracts/{id} Delete a contract
ContractsApi scPublicV3ScpGetAllContracts GET /contracts Retrieve a list of contracts
ContractsApi scPublicV3ScpGetAllContractsSchemas GET /contracts/schemas Retrieve a list of contracts schemas
ContractsApi scPublicV3ScpGetSpecificContract GET /contracts/{id} Retrieve a contract
ContractsApi scPublicV3ScpPatchContract PATCH /contracts/{id} Update a contract
ContractsApi scPublicV3ScpPostCreateContract POST /contracts Create a contract for carrier
CreateTicketApi scPublicV3DsfPostTicketsAddressChange POST /dsf/tickets/address-change Create ticket for an address change
CreateTicketApi scPublicV3DsfPostTicketsDamage POST /dsf/tickets/damage Create ticket for a damaged parcel
CreateTicketApi scPublicV3DsfPostTicketsDelay POST /dsf/tickets/delay Create ticket for a delayed parcel
CreateTicketApi scPublicV3DsfPostTicketsDeliveredButNotReceived POST /dsf/tickets/delivered-but-not-received Create ticket for a delivered but not received parcel
CreateTicketApi scPublicV3DsfPostTicketsLost POST /dsf/tickets/lost Create ticket for a lost parcel
CreateTicketApi scPublicV3DsfPostTicketsUnjustReturn POST /dsf/tickets/unjust-return Create ticket for an unjustly returned parcel
DeliveryOptionsApi scPublicV3CheckoutApiGetDeliveryOptions GET /checkout/configurations/{configuration_id}/delivery-options Retrieve a list of delivery options
FileUploadApi scPublicV3DsfPostFiles POST /dsf/files Upload File
IntegrationsApi scPublicV3IntegrationsDeleteDeleteIntegration DELETE /integrations/{id} Delete an integration
IntegrationsApi scPublicV3IntegrationsGetListIntegrations GET /integrations List all integrations
IntegrationsApi scPublicV3IntegrationsGetRetrieveIntegration GET /integrations/{id} Retrieve an integration
IntegrationsApi scPublicV3IntegrationsGetShopOrderStatuses GET /shop-order-statuses Retrieve available shop order statuses for a given integration.
IntegrationsApi scPublicV3IntegrationsGetShopOrderStatusesMapping GET /shop-order-statuses/mapping/ Retrieve custom status mapping for an integration
IntegrationsApi scPublicV3IntegrationsPatchUpdateIntegration PATCH /integrations/{id} Update certain parts of an integration
IntegrationsApi scPublicV3IntegrationsPostShopOrderStatuses POST /shop-order-statuses Create or overwrite the whole list of available shop order statuses.
IntegrationsApi scPublicV3IntegrationsPostShopOrderStatusesMapping POST /shop-order-statuses/mapping/ Create or update custom status mapping for an integration
OAuth2Api oauth2TokenExchange POST /oauth2/token The OAuth 2.0 Token Endpoint
OrdersApi scPublicV3OrdersDeleteDeleteOrder DELETE /orders/{id} Delete an order
OrdersApi scPublicV3OrdersGetListOrders GET /orders Retrieve orders from integrations
OrdersApi scPublicV3OrdersGetRetrieveOrder GET /orders/{id} Retrieving a specific order
OrdersApi scPublicV3OrdersPatchPartialUpdateOrder PATCH /orders/{id} Update an order
OrdersApi scPublicV3OrdersPostCreateOrders POST /orders Create/Update orders in batch
ParcelDocumentsApi scPublicV3ScpGetRetrieveParcelDocuments GET /parcels/{id}/documents/{type} Retrieve a parcel document
ParcelDocumentsApi scPublicV3ScpGetRetrieveParcelDocumentsBulk GET /parcel-documents/{type} Retrieve multiple parcel documents
ParcelStatusesApi scPublicV3ScpGetAllParcelStatuses GET /parcels/statuses Retrieve a list of all possible parcel statuses
ParcelTrackingApi scPublicV3ShippingIntelligenceEngineGetGetParcelByTrackingNumber GET /parcels/tracking/{tracking_number} Retrieve tracking information of a parcel
ParcelTrackingApi scPublicV3ShippingIntelligenceEnginePostRegisterParcelForTracking POST /parcels/tracking Create a tracking-only parcel
PickupsApi scPublicV3ScpGetAllPickups GET /pickups Retrieve a list of pickups
PickupsApi scPublicV3ScpGetPickup GET /pickups/{id} Retrieve a pickup
PickupsApi scPublicV3ScpPostPickup POST /pickups Create a pickup
RequestedDataApi scPublicV3DsfGetRequestedData GET /support/dsf/tickets/requested-data Retrieve requested data.
RequestedDataApi scPublicV3DsfPostRequestedData POST /support/dsf/tickets/requested-data Provide a requested data.
ReturnsApi scPublicV3ScpGetReturnsGetDetails GET /returns/{id} Retrieve a Return
ReturnsApi scPublicV3ScpGetReturnsGetReturns GET /returns Retrieve a list of Returns
ReturnsApi scPublicV3ScpPatchReturnsCancel PATCH /returns/{id}/cancel Request cancellation of a specific Return
ReturnsApi scPublicV3ScpPostReturnsCreateNewReturn POST /returns Create a return
ReturnsApi scPublicV3ScpPostReturnsCreateNewReturnSynchronously POST /returns/announce-synchronously Create a return synchronously
ReturnsApi scPublicV3ScpPostReturnsValidate POST /returns/validate Validate a return
SenderAddressApi scPublicV3AddressesGetAllSenderAddresses GET /addresses/sender-addresses Retrieve a list of sender addresses
SenderAddressApi scPublicV3AddressesGetSenderAddressById GET /addresses/sender-addresses/{id} Retrieve a sender address
ShipAnOrderApi scPublicV3OrdersLabelsPostCreateLabelsAsync POST /orders/create-labels-async Request a label for given orders asynchronously.
ShipAnOrderApi scPublicV3OrdersLabelsPostCreateLabelsSync POST /orders/create-label-sync Request a label for given order synchronously.
ShipmentsApi scPublicV3ScpGetAllShipments GET /shipments Retrieve shipments
ShipmentsApi scPublicV3ScpGetShipmentById GET /shipments/{id} Retrieve a shipment
ShipmentsApi scPublicV3ScpPostAnnounceShipment POST /shipments/announce Create and announce a shipment synchronously
ShipmentsApi scPublicV3ScpPostAnnounceShipmentWithRules POST /shipments/announce-with-shipping-rules Create a shipment with rules and / or defaults and announce it synchronously
ShipmentsApi scPublicV3ScpPostCancelShipment POST /shipments/{id}/cancel Cancel a shipment
ShipmentsApi scPublicV3ScpPostCreateShipment POST /shipments Create and announce a shipment asynchronously
ShipmentsApi scPublicV3ScpPostCreateShipmentWithRules POST /shipments/create-with-shipping-rules Create a shipment with rules and / or defaults and announce it asynchronously
ShippingOptionsApi scPublicV3ScpPostShippingOptions POST /shipping-options Return a list of available shipping options [BETA]
ShippingOptionsApi scPublicV3ScpPostShippingOptionsSimple POST /fetch-shipping-options Create a list of shipping options
UserApi scPublicV3ScpGetUserAuthMetadata GET /user/auth/metadata Retrieve information about the metadata associated with the authentication used in the request.

Models

Authorization

HTTPBasicAuth

  • Type: HTTP basic authentication

OAuth2

  • Type: OAuth
  • Flow: application
  • Authorization URL: ``
  • Scopes:
    • api: Full API access

OAuth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://account.sendcloud.com/oauth2/auth
  • Scopes:
    • api: Full API access

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

contact@sendcloud.com

About this package

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

  • API version: 3.0.0
    • Package version: 1.0.0
    • Generator version: 7.18.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-30