(shippoAccounts())
Shippo Accounts are used by Shippo Platform Accounts to create and manage Managed Shippo Accounts.
Managed Shippo Accounts are headless accounts that represent your customers. They are opaque to your end customers, meaning customers do not need to create their own Shippo login or have a billing relationship with Shippo.
They can be used by marketplaces, e-commerce platforms, and third-party logistics providers who want to offer, seamless, built-in shipping functionality to their customers. See our guide for more details.
- list - List all Shippo Accounts
- create - Create a Shippo Account
- get - Retrieve a Shippo Account
- update - Update a Shippo Account
Returns a list of Shippo Managed Accounts objects.
package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.ListShippoAccountsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("<YOUR_API_KEY_HERE>")
.shippoApiVersion("2018-02-08")
.build();
ListShippoAccountsResponse res = sdk.shippoAccounts().list()
.page(1L)
.results(25L)
.shippoApiVersion("2018-02-08")
.call();
if (res.shippoAccountPaginatedList().isPresent()) {
// handle response
}
}
}
| Parameter |
Type |
Required |
Description |
Example |
page |
Optional<Long> |
➖ |
The page number you want to select |
|
results |
Optional<Long> |
➖ |
The number of results to return per page (max 100) |
|
shippoApiVersion |
Optional<String> |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
ListShippoAccountsResponse
| Error Type |
Status Code |
Content Type |
| models/errors/SDKError |
4XX, 5XX |
*/* |
Creates a new Shippo Managed Account.
package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.components.ShippoAccountUpdateRequest;
import com.goshippo.shippo_sdk.models.operations.CreateShippoAccountResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("<YOUR_API_KEY_HERE>")
.shippoApiVersion("2018-02-08")
.build();
CreateShippoAccountResponse res = sdk.shippoAccounts().create()
.shippoApiVersion("2018-02-08")
.shippoAccountUpdateRequest(ShippoAccountUpdateRequest.builder()
.email("hippo@shippo.com")
.firstName("Shippo")
.lastName("Meister")
.companyName("Acme")
.build())
.call();
if (res.shippoAccount().isPresent()) {
// handle response
}
}
}
| Parameter |
Type |
Required |
Description |
Example |
shippoApiVersion |
Optional<String> |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
shippoAccountUpdateRequest |
ShippoAccountUpdateRequest |
✔️ |
N/A |
|
CreateShippoAccountResponse
| Error Type |
Status Code |
Content Type |
| models/errors/SDKError |
4XX, 5XX |
*/* |
Returns a Shippo Managed Account using an object ID.
package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.GetShippoAccountResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("<YOUR_API_KEY_HERE>")
.shippoApiVersion("2018-02-08")
.build();
GetShippoAccountResponse res = sdk.shippoAccounts().get()
.shippoAccountId("<id>")
.shippoApiVersion("2018-02-08")
.call();
if (res.shippoAccount().isPresent()) {
// handle response
}
}
}
| Parameter |
Type |
Required |
Description |
Example |
shippoAccountId |
String |
✔️ |
Object ID of the ShippoAccount |
|
shippoApiVersion |
Optional<String> |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
GetShippoAccountResponse
| Error Type |
Status Code |
Content Type |
| models/errors/SDKError |
4XX, 5XX |
*/* |
Updates a Shippo Managed Account using an object ID.
package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.components.ShippoAccountUpdateRequest;
import com.goshippo.shippo_sdk.models.operations.UpdateShippoAccountResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("<YOUR_API_KEY_HERE>")
.shippoApiVersion("2018-02-08")
.build();
UpdateShippoAccountResponse res = sdk.shippoAccounts().update()
.shippoAccountId("<id>")
.shippoApiVersion("2018-02-08")
.shippoAccountUpdateRequest(ShippoAccountUpdateRequest.builder()
.email("hippo@shippo.com")
.firstName("Shippo")
.lastName("Meister")
.companyName("Acme")
.build())
.call();
if (res.shippoAccount().isPresent()) {
// handle response
}
}
}
| Parameter |
Type |
Required |
Description |
Example |
shippoAccountId |
String |
✔️ |
Object ID of the ShippoAccount |
|
shippoApiVersion |
Optional<String> |
➖ |
Optional string used to pick a non-default API version to use. See our API version guide. |
2018-02-08 |
shippoAccountUpdateRequest |
Optional<ShippoAccountUpdateRequest> |
➖ |
N/A |
|
UpdateShippoAccountResponse
| Error Type |
Status Code |
Content Type |
| models/errors/SDKError |
4XX, 5XX |
*/* |