chengkun
2025-09-09 774d962b76d63366ed26c395e0a33cdbec309242
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<?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/fulfillment-outbound-api-model/fulfillmentOutbound_2020-07-01.json
* Source MD5 signature: 3f57edb71b98d64ffe03e94fddeac0fe
*
*
* Selling Partner APIs for Fulfillment Outbound
* The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.
*/
namespace DoubleBreak\Spapi\Api;
use DoubleBreak\Spapi\Client;
 
class FulfillmentOutbound extends Client {
 
  /**
  * Operation getFulfillmentPreview
  *
  */
  public function getFulfillmentPreview($body = [])
  {
    return $this->send("/fba/outbound/2020-07-01/fulfillmentOrders/preview", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  public function getFulfillmentPreviewAsync($body = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/fulfillmentOrders/preview", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  /**
  * Operation listAllFulfillmentOrders
  *
  * @param array $queryParams
  *    - *queryStartDate* string - A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order.
  *    - *nextToken* string - A string token returned in the response to your previous request.
  *
  */
  public function listAllFulfillmentOrders($queryParams = [])
  {
    return $this->send("/fba/outbound/2020-07-01/fulfillmentOrders", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function listAllFulfillmentOrdersAsync($queryParams = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/fulfillmentOrders", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation createFulfillmentOrder
  *
  */
  public function createFulfillmentOrder($body = [])
  {
    return $this->send("/fba/outbound/2020-07-01/fulfillmentOrders", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  public function createFulfillmentOrderAsync($body = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/fulfillmentOrders", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  /**
  * Operation getPackageTrackingDetails
  *
  * @param array $queryParams
  *    - *packageNumber* integer - The unencrypted package identifier returned by the getFulfillmentOrder operation.
  *
  */
  public function getPackageTrackingDetails($queryParams = [])
  {
    return $this->send("/fba/outbound/2020-07-01/tracking", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getPackageTrackingDetailsAsync($queryParams = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/tracking", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation listReturnReasonCodes
  *
  * @param array $queryParams
  *    - *sellerSku* string - The seller SKU for which return reason codes are required.
  *    - *marketplaceId* string - The marketplace for which the seller wants return reason codes.
  *    - *sellerFulfillmentOrderId* string - The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes.
  *    - *language* string - The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into.
  *
  */
  public function listReturnReasonCodes($queryParams = [])
  {
    return $this->send("/fba/outbound/2020-07-01/returnReasonCodes", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function listReturnReasonCodesAsync($queryParams = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/returnReasonCodes", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation createFulfillmentReturn
  *
  * @param string $sellerFulfillmentOrderId An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct SellerFulfillmentOrderId value based on the buyer's request to return items.
  *
  */
  public function createFulfillmentReturn($sellerFulfillmentOrderId, $body = [])
  {
    return $this->send("/fba/outbound/2020-07-01/fulfillmentOrders/{$sellerFulfillmentOrderId}/return", [
      'method' => 'PUT',
      'json' => $body
    ]);
  }
 
  public function createFulfillmentReturnAsync($sellerFulfillmentOrderId, $body = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/fulfillmentOrders/{$sellerFulfillmentOrderId}/return", [
      'method' => 'PUT',
      'json' => $body
    ]);
  }
 
  /**
  * Operation getFulfillmentOrder
  *
  * @param string $sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
  *
  */
  public function getFulfillmentOrder($sellerFulfillmentOrderId)
  {
    return $this->send("/fba/outbound/2020-07-01/fulfillmentOrders/{$sellerFulfillmentOrderId}", [
      'method' => 'GET',
    ]);
  }
 
  public function getFulfillmentOrderAsync($sellerFulfillmentOrderId)
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/fulfillmentOrders/{$sellerFulfillmentOrderId}", [
      'method' => 'GET',
    ]);
  }
 
  /**
  * Operation updateFulfillmentOrder
  *
  * @param string $sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
  *
  */
  public function updateFulfillmentOrder($sellerFulfillmentOrderId, $body = [])
  {
    return $this->send("/fba/outbound/2020-07-01/fulfillmentOrders/{$sellerFulfillmentOrderId}", [
      'method' => 'PUT',
      'json' => $body
    ]);
  }
 
  public function updateFulfillmentOrderAsync($sellerFulfillmentOrderId, $body = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/fulfillmentOrders/{$sellerFulfillmentOrderId}", [
      'method' => 'PUT',
      'json' => $body
    ]);
  }
 
  /**
  * Operation cancelFulfillmentOrder
  *
  * @param string $sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
  *
  */
  public function cancelFulfillmentOrder($sellerFulfillmentOrderId)
  {
    return $this->send("/fba/outbound/2020-07-01/fulfillmentOrders/{$sellerFulfillmentOrderId}/cancel", [
      'method' => 'PUT',
    ]);
  }
 
  public function cancelFulfillmentOrderAsync($sellerFulfillmentOrderId)
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/fulfillmentOrders/{$sellerFulfillmentOrderId}/cancel", [
      'method' => 'PUT',
    ]);
  }
 
  /**
  * Operation getFeatures
  *
  * @param array $queryParams
  *    - *marketplaceId* string - The marketplace for which to return the list of features.
  *
  */
  public function getFeatures($queryParams = [])
  {
    return $this->send("/fba/outbound/2020-07-01/features", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getFeaturesAsync($queryParams = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/features", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation getFeatureInventory
  *
  * @param string $featureName The name of the feature for which to return a list of eligible inventory.
  *
  * @param array $queryParams
  *    - *marketplaceId* string - The marketplace for which to return a list of the inventory that is eligible for the specified feature.
  *    - *nextToken* string - A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page.
  *
  */
  public function getFeatureInventory($featureName, $queryParams = [])
  {
    return $this->send("/fba/outbound/2020-07-01/features/inventory/{$featureName}", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getFeatureInventoryAsync($featureName, $queryParams = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/features/inventory/{$featureName}", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation getFeatureSKU
  *
  * @param string $featureName The name of the feature.
  * @param string $sellerSku Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.
  *
  * @param array $queryParams
  *    - *marketplaceId* string - The marketplace for which to return the count.
  *
  */
  public function getFeatureSKU($featureName, $sellerSku, $queryParams = [])
  {
    return $this->send("/fba/outbound/2020-07-01/features/inventory/{$featureName}/{$sellerSku}", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getFeatureSKUAsync($featureName, $sellerSku, $queryParams = [])
  {
    return $this->sendAsync("/fba/outbound/2020-07-01/features/inventory/{$featureName}/{$sellerSku}", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
}