Skip to content

Latest commit

 

History

History
194 lines (138 loc) · 19.2 KB

File metadata and controls

194 lines (138 loc) · 19.2 KB

ShippoAccounts

(ShippoAccounts)

Overview

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.

Available Operations

  • List - List all Shippo Accounts
  • Create - Create a Shippo Account
  • Get - Retrieve a Shippo Account
  • Update - Update a Shippo Account

List

Returns a list of Shippo Managed Accounts objects.

Example Usage

using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
    apiKeyHeader: "<YOUR_API_KEY_HERE>",
    shippoApiVersion: "2018-02-08"
);

var res = await sdk.ShippoAccounts.ListAsync(
    page: 1,
    results: 25,
    shippoApiVersion: "2018-02-08"
);

// handle response

Parameters

Parameter Type Required Description Example
Page long The page number you want to select
Results long The number of results to return per page (max 100)
ShippoApiVersion string Optional string used to pick a non-default API version to use. See our API version guide. 2018-02-08

Response

ShippoAccountPaginatedList

Errors

Error Type Status Code Content Type
Shippo.Models.Errors.SDKException 4XX, 5XX */*

Create

Creates a new Shippo Managed Account.

Example Usage

using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
    apiKeyHeader: "<YOUR_API_KEY_HERE>",
    shippoApiVersion: "2018-02-08"
);

var res = await sdk.ShippoAccounts.CreateAsync(
    shippoAccountUpdateRequest: new ShippoAccountUpdateRequest() {
        Email = "hippo@shippo.com",
        FirstName = "Shippo",
        LastName = "Meister",
        CompanyName = "Acme",
    },
    shippoApiVersion: "2018-02-08"
);

// handle response

Parameters

Parameter Type Required Description Example
ShippoAccountUpdateRequest ShippoAccountUpdateRequest ✔️ N/A
ShippoApiVersion string Optional string used to pick a non-default API version to use. See our API version guide. 2018-02-08

Response

ShippoAccount

Errors

Error Type Status Code Content Type
Shippo.Models.Errors.SDKException 4XX, 5XX */*

Get

Returns a Shippo Managed Account using an object ID.

Example Usage

using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
    apiKeyHeader: "<YOUR_API_KEY_HERE>",
    shippoApiVersion: "2018-02-08"
);

var res = await sdk.ShippoAccounts.GetAsync(
    shippoAccountId: "<id>",
    shippoApiVersion: "2018-02-08"
);

// handle response

Parameters

Parameter Type Required Description Example
ShippoAccountId string ✔️ Object ID of the ShippoAccount
ShippoApiVersion string Optional string used to pick a non-default API version to use. See our API version guide. 2018-02-08

Response

ShippoAccount

Errors

Error Type Status Code Content Type
Shippo.Models.Errors.SDKException 4XX, 5XX */*

Update

Updates a Shippo Managed Account using an object ID.

Example Usage

using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
    apiKeyHeader: "<YOUR_API_KEY_HERE>",
    shippoApiVersion: "2018-02-08"
);

var res = await sdk.ShippoAccounts.UpdateAsync(
    shippoAccountId: "<id>",
    shippoApiVersion: "2018-02-08",
    shippoAccountUpdateRequest: new ShippoAccountUpdateRequest() {
        Email = "hippo@shippo.com",
        FirstName = "Shippo",
        LastName = "Meister",
        CompanyName = "Acme",
    }
);

// handle response

Parameters

Parameter Type Required Description Example
ShippoAccountId string ✔️ Object ID of the ShippoAccount
ShippoApiVersion 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

Response

ShippoAccount

Errors

Error Type Status Code Content Type
Shippo.Models.Errors.SDKException 4XX, 5XX */*