RapidAPI logo

Lob

フリー
開発者 dimashirokov
更新日 5ヶ月前
物流
5.5/10
人気度
93ms
レイテンシ
-
正常稼働率

「Lob 」のドキュメント

物理的なメールをプログラム的に送信します。

全文を表示する
POSTcreateAddress
POSTcreateAreaMailing
POSTcreateBankAccount
POSTcreateCheck
POSTcreateLetter
POSTcreatePostcard
POSTdeleteAddress
POSTdeleteBankAccount
POSTgetAddress
POSTgetAllAddresses
POSTgetAllAreaMailings
POSTgetAllBankAccounts
POSTgetAllChecks
POSTgetAllCountries
POSTgetAllLetters
POSTgetAllPostcards
POSTgetAllRoutes
POSTgetAllStates
POSTretrieveAreaMailing
POSTretrieveBankAccount
POSTretrieveCheck
POSTretrieveLetter
POSTretrievePostcard
POSTretrieveRoutesByZipcode
POSTverifyAddress
POSTverifyBankAccount
POSTcreateAddress

新しいアドレスオブジェクトを作成します。

ヘッダーパラメータ
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
必須パラメータ
addressLine1STRING
REQUIREDThe total string must be no longer than 200 characters.
apiKeyCREDENTIALS
REQUIREDApi Key.
addressStateSTRING
REQUIREDRequired and must be a 2 letter state short-name code if address_country is US, otherwise optional and the total string can not be any longer than 200 characters.
addressCitySTRING
REQUIREDRequired if address_country is US, otherwise optional. The total string must be no longer than 200 characters.
companySTRING
REQUIREDEither name or company is required, you may also add both. The total string for company must be no longer than 200 characters. If both name and company are provided, they will be printed on two separate lines above the rest of the address.
addressLine2STRING
REQUIREDThe total string must be no longer than 200 characters.
addressZipSTRING
REQUIREDRequired and must follow the ZIP format of 12345 or ZIP+4 format of 12345-1234 if address_country is US, otherwise optional and the total string can not be any longer than 40 characters.
パラメータ(Option)
metadataARRAY
OPTIONALMust be an Array with up to 20 key-value pairs. Keys must at most 40 characters and values must be at most 500 characters. Neither can contain the characters and Nested objects are not supported. See Metadata for more information.
phoneSTRING
OPTIONALThe total string must be no longer than 40 characters.
addressCountrySTRING
OPTIONALMust be a 2 letter country short-name code (ISO 3166). Defaults to US.
nameSTRING
OPTIONALEither name or company is required, you may also add both. The total string for name must be no longer than 50 characters. If both name and company are provided, they will be printed on two separate lines above the rest of the address.
emailSTRING
OPTIONALThe total string must be no longer than 100 characters.
descriptionSTRING
OPTIONALAddress description.
コードスニペット
unirest.post("https://LobdimashirokovV1.p.rapidapi.com/createAddress")
.header("X-RapidAPI-Host", "LobdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "ログインしてキーを取得")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
サンプルレスポンス
概要
リクエストURL: https://LobdimashirokovV1.p.rapidapi.com/createAddress
リクエストメソッド: POST
レスポンスヘッダ
レスポンスボディ

SDKをインストール(NodeJS)

インストール

Node.jsでUnirestを使用するには、NPMモジュールをインストールしてください。

$ npm install unirest

インストール完了後は、簡単にリクエストを行うことができるようになります。

var unirest = require('unirest');

リクエスト

unirest.post("https://LobdimashirokovV1.p.rapidapi.com/createAddress")
.header("X-RapidAPI-Host", "LobdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "ログインしてキーを取得")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2認証
クライアントID
クライアントシークレット
OAuth2認証