Sellers
The 6 operations under sellers, as typed calls on the generated REST client.
Available from @codespar/sdk 0.12.0; the version on npm is 0.16.18. When these docs build, the examples on this page are compiled against @codespar/sdk 0.16.18, the version this site installs: a call that does not type-check against it fails the build.
Every call below is cs.api reaching one operation of the OpenAPI document this page was generated from; the REST client overview explains request, response, the option bag and the errors. The values are placeholders shaped by the document.
import { } from "@codespar/sdk";
const = new ({ : .. });POST /v1/sellers
Onboard a seller (KYB) and affiliate it at Rinne
const = await ..("/v1/sellers", {
: {
: "Example",
: "Example",
: "string",
: "CNPJ",
: "PJ",
: "string",
: {},
: {},
: {
: true,
: "DAILY",
: "PIX",
: 0,
: 0,
: 0,
: 1000
},
: 0,
: 0,
: 0,
: "https://example.com/hook",
: "https://example.com/hook",
: "feepolicy_0000000000000000",
: {},
: "linkedconsumer_0000000000000000",
: [
"string"
],
: [
"string"
]
}
});Parameters, body and every documented response: POST /v1/sellers in the HTTP reference.
GET /v1/sellers/{sellerId}
Read one seller
const = await ..("/v1/sellers/{sellerId}", {
: {
: "slr_0000000000000000"
}
});Parameters, body and every documented response: GET /v1/sellers/{sellerId} in the HTTP reference.
GET /v1/sellers/{sellerId}/custody
Compare this seller's ledger against Rinne's custody
const = await ..("/v1/sellers/{sellerId}/custody", {
: {
: "slr_0000000000000000"
}
});Parameters, body and every documented response: GET /v1/sellers/{sellerId}/custody in the HTTP reference.
GET /v1/sellers/{sellerId}/ledger
This seller's wallet ledger, without learning the wallet id
const = await ..("/v1/sellers/{sellerId}/ledger", {
: {
: "slr_0000000000000000"
}
});Parameters, body and every documented response: GET /v1/sellers/{sellerId}/ledger in the HTTP reference.
GET /v1/sellers/{sellerId}/pending-settlement
What Rinne reports as sold but not yet settled
const = await ..("/v1/sellers/{sellerId}/pending-settlement", {
: {
: "slr_0000000000000000"
}
});Parameters, body and every documented response: GET /v1/sellers/{sellerId}/pending-settlement in the HTTP reference.
GET /v1/sellers/{sellerId}/status
Refresh a seller's affiliation status from Rinne
const = await ..("/v1/sellers/{sellerId}/status", {
: {
: "slr_0000000000000000"
}
});Parameters, body and every documented response: GET /v1/sellers/{sellerId}/status in the HTTP reference.