chengkun
2025-09-09 1ff9e27b020822168a95edd83be567e7153837f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
* This class is autogenerated by the Spapi class generator
* Date of generation: 2022-05-26
* Specification: https://github.com/amzn/selling-partner-api-models/blob/main/models/vendor-direct-fulfillment-shipping-api-model/vendorDirectFulfillmentShipping_2021-12-28.json
* Source MD5 signature: e1c5c48c9f2b238160b8b62ec9d10722
*
*
* Selling Partner API for Direct Fulfillment Shipping
* The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor's shipping data.
*/
namespace DoubleBreak\Spapi\Api;
use DoubleBreak\Spapi\Client;
 
class VendorDirectFulfillmentShipping extends Client {
 
  /**
  * Operation getShippingLabels
  *
  * @param array $queryParams
  *    - *shipFromPartyId* string - The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
  *    - *limit* integer - The limit to the number of records returned.
  *    - *createdAfter* string - Shipping labels that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
  *    - *createdBefore* string - Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
  *    - *sortOrder* string - Sort ASC or DESC by order creation date.
  *    - *nextToken* string - Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
  *
  */
  public function getShippingLabels($queryParams = [])
  {
    return $this->send("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getShippingLabelsAsync($queryParams = [])
  {
    return $this->sendAsync("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation submitShippingLabelRequest
  *
  */
  public function submitShippingLabelRequest($body = [])
  {
    return $this->send("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  public function submitShippingLabelRequestAsync($body = [])
  {
    return $this->sendAsync("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  /**
  * Operation getShippingLabel
  *
  * @param string $purchaseOrderNumber The purchase order number for which you want to return the shipping label. It should be the same purchaseOrderNumber as received in the order.
  *
  */
  public function getShippingLabel($purchaseOrderNumber)
  {
    return $this->send("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/{$purchaseOrderNumber}", [
      'method' => 'GET',
    ]);
  }
 
  public function getShippingLabelAsync($purchaseOrderNumber)
  {
    return $this->sendAsync("/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/{$purchaseOrderNumber}", [
      'method' => 'GET',
    ]);
  }
}