- create - Add buyer shipping details
- list - List a buyer's shipping details
- get - Get buyer shipping details
- update - Update a buyer's shipping details
- delete - Delete a buyer's shipping details
Associate shipping details to a buyer.
declare(strict_types=1);
require 'vendor/autoload.php';
use Gr4vy;
$sdk = Gr4vy\SDK::builder()
->setMerchantAccountId('default')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$shippingDetailsCreate = new Gr4vy\ShippingDetailsCreate();
$response = $sdk->buyers->shippingDetails->create(
buyerId: 'fe26475d-ec3e-4884-9553-f7356683f7f9',
shippingDetailsCreate: $shippingDetailsCreate
);
if ($response->shippingDetails !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
buyerId |
string | ✔️ | The ID of the buyer to add shipping details to. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
shippingDetailsCreate |
ShippingDetailsCreate | ✔️ | N/A | |
merchantAccountId |
?string | ➖ | The ID of the merchant account to use for this request. | default |
?AddBuyerShippingDetailsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Error400 | 400 | application/json |
| Errors\Error401 | 401 | application/json |
| Errors\Error403 | 403 | application/json |
| Errors\Error404 | 404 | application/json |
| Errors\Error405 | 405 | application/json |
| Errors\Error409 | 409 | application/json |
| Errors\HTTPValidationError | 422 | application/json |
| Errors\Error425 | 425 | application/json |
| Errors\Error429 | 429 | application/json |
| Errors\Error500 | 500 | application/json |
| Errors\Error502 | 502 | application/json |
| Errors\Error504 | 504 | application/json |
| errors\APIException | 4XX, 5XX | */* |
List all the shipping details associated to a specific buyer.
declare(strict_types=1);
require 'vendor/autoload.php';
use Gr4vy;
$sdk = Gr4vy\SDK::builder()
->setMerchantAccountId('default')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->buyers->shippingDetails->list(
buyerId: 'fe26475d-ec3e-4884-9553-f7356683f7f9'
);
if ($response->shippingDetailsList !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
buyerId |
string | ✔️ | The ID of the buyer to retrieve shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
merchantAccountId |
?string | ➖ | The ID of the merchant account to use for this request. | default |
?ListBuyerShippingDetailsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Error400 | 400 | application/json |
| Errors\Error401 | 401 | application/json |
| Errors\Error403 | 403 | application/json |
| Errors\Error404 | 404 | application/json |
| Errors\Error405 | 405 | application/json |
| Errors\Error409 | 409 | application/json |
| Errors\HTTPValidationError | 422 | application/json |
| Errors\Error425 | 425 | application/json |
| Errors\Error429 | 429 | application/json |
| Errors\Error500 | 500 | application/json |
| Errors\Error502 | 502 | application/json |
| Errors\Error504 | 504 | application/json |
| errors\APIException | 4XX, 5XX | */* |
Get a buyer's shipping details.
declare(strict_types=1);
require 'vendor/autoload.php';
use Gr4vy;
$sdk = Gr4vy\SDK::builder()
->setMerchantAccountId('default')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->buyers->shippingDetails->get(
buyerId: 'fe26475d-ec3e-4884-9553-f7356683f7f9',
shippingDetailsId: 'bf8c36ad-02d9-4904-b0f9-a230b149e341'
);
if ($response->shippingDetails !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
buyerId |
string | ✔️ | The ID of the buyer to retrieve shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
shippingDetailsId |
string | ✔️ | The ID of the shipping details to retrieve. | bf8c36ad-02d9-4904-b0f9-a230b149e341 |
merchantAccountId |
?string | ➖ | The ID of the merchant account to use for this request. | default |
?GetBuyerShippingDetailsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Error400 | 400 | application/json |
| Errors\Error401 | 401 | application/json |
| Errors\Error403 | 403 | application/json |
| Errors\Error404 | 404 | application/json |
| Errors\Error405 | 405 | application/json |
| Errors\Error409 | 409 | application/json |
| Errors\HTTPValidationError | 422 | application/json |
| Errors\Error425 | 425 | application/json |
| Errors\Error429 | 429 | application/json |
| Errors\Error500 | 500 | application/json |
| Errors\Error502 | 502 | application/json |
| Errors\Error504 | 504 | application/json |
| errors\APIException | 4XX, 5XX | */* |
Update the shipping details associated to a specific buyer.
declare(strict_types=1);
require 'vendor/autoload.php';
use Gr4vy;
$sdk = Gr4vy\SDK::builder()
->setMerchantAccountId('default')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$shippingDetailsUpdate = new Gr4vy\ShippingDetailsUpdate();
$response = $sdk->buyers->shippingDetails->update(
buyerId: 'fe26475d-ec3e-4884-9553-f7356683f7f9',
shippingDetailsId: 'bf8c36ad-02d9-4904-b0f9-a230b149e341',
shippingDetailsUpdate: $shippingDetailsUpdate
);
if ($response->shippingDetails !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
buyerId |
string | ✔️ | The ID of the buyer to update shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
shippingDetailsId |
string | ✔️ | The ID of the shipping details to update. | bf8c36ad-02d9-4904-b0f9-a230b149e341 |
shippingDetailsUpdate |
ShippingDetailsUpdate | ✔️ | N/A | |
merchantAccountId |
?string | ➖ | The ID of the merchant account to use for this request. | default |
?UpdateBuyerShippingDetailsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Error400 | 400 | application/json |
| Errors\Error401 | 401 | application/json |
| Errors\Error403 | 403 | application/json |
| Errors\Error404 | 404 | application/json |
| Errors\Error405 | 405 | application/json |
| Errors\Error409 | 409 | application/json |
| Errors\HTTPValidationError | 422 | application/json |
| Errors\Error425 | 425 | application/json |
| Errors\Error429 | 429 | application/json |
| Errors\Error500 | 500 | application/json |
| Errors\Error502 | 502 | application/json |
| Errors\Error504 | 504 | application/json |
| errors\APIException | 4XX, 5XX | */* |
Delete the shipping details associated to a specific buyer.
declare(strict_types=1);
require 'vendor/autoload.php';
use Gr4vy;
$sdk = Gr4vy\SDK::builder()
->setMerchantAccountId('default')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->buyers->shippingDetails->delete(
buyerId: 'fe26475d-ec3e-4884-9553-f7356683f7f9',
shippingDetailsId: 'bf8c36ad-02d9-4904-b0f9-a230b149e341'
);
if ($response->statusCode === 200) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
buyerId |
string | ✔️ | The ID of the buyer to delete shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
shippingDetailsId |
string | ✔️ | The ID of the shipping details to delete. | bf8c36ad-02d9-4904-b0f9-a230b149e341 |
merchantAccountId |
?string | ➖ | The ID of the merchant account to use for this request. | default |
?DeleteBuyerShippingDetailsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Error400 | 400 | application/json |
| Errors\Error401 | 401 | application/json |
| Errors\Error403 | 403 | application/json |
| Errors\Error404 | 404 | application/json |
| Errors\Error405 | 405 | application/json |
| Errors\Error409 | 409 | application/json |
| Errors\HTTPValidationError | 422 | application/json |
| Errors\Error425 | 425 | application/json |
| Errors\Error429 | 429 | application/json |
| Errors\Error500 | 500 | application/json |
| Errors\Error502 | 502 | application/json |
| Errors\Error504 | 504 | application/json |
| errors\APIException | 4XX, 5XX | */* |