Get a submission
/v1/compliance/submissions/{submission_id}const submission = await bird.complianceSubmissions.get(
"csb_01krdgeqcxet5s7t44vh8rt9mg",
);
for (const item of submission.items ?? []) {
console.log(item.key, item.state, item.reason ?? "");
}submission = client.compliance_submissions.get("csb_01krdgeqcxet5s7t44vh8rt9mg")
for item in submission.items or []:
print(item.key, item.state, item.reason or "")submission, err := client.ComplianceSubmissions.Get(context.Background(), "csb_01krdgeqcxet5s7t44vh8rt9mg")
if err != nil {
log.Fatal(err)
}
for _, item := range *submission.Items {
fmt.Println(*item.Key, *item.State)
}$submission = $bird->complianceSubmissions->get('csb_01krdgeqcxet5s7t44vh8rt9mg');
foreach ($submission->getItems() ?? [] as $item) {
echo $item->getKey(), ' ', $item->getState(), ' ', $item->getReason() ?? '', "\n";
}bird compliance submissions get <submission-id>curl -X GET "https://us1.platform.bird.com/v1/compliance/submissions/{submission_id}" \
-H "Authorization: Bearer $TOKEN"{
"next": [
{
"kind": "operation"
}
],
"id": "csb_01krdgeqcxet5s7t44vh8rt9mg",
"subject_kind": "sms_sender",
"subject_id": "scr_01krdgeqcxet5s7t44vh8rt9mg",
"program": "alpha",
"country_code": "US",
"identity_id": "cid_01krdgeqcxet5s7t44vh8rt9mg",
"items": [
{
"id": "cit_01krdgeqcxet5s7t44vh8rt9mg",
"state": "not_supplied",
"attachment_id": "tca_01krdgeqcxet5s7t44vh8rt9mg",
"attachment_ids": [
"tca_01krdgeqcxet5s7t44vh8rt9mg"
]
}
]
}
Returns every answer on a submission and where each one stands. Each is decided on its own, so some can be accepted while others are still under review or need replacing, and a rejected answer carries the reason it was refused.
Parámetros
submission_idstringSubmission ID.
Carga de respuesta
nextWhat to do next about this submission, given the state it is in. Each entry names one action and says why it is worth taking, so you can act on this response without working out the order yourself. Present on reads that compute it: an empty list means there is nothing to do, and the field is absent entirely on responses that do not report next actions.
A submission reports the answers you filed; whether the country's requirements are met is reported by the requirements read. So this points there rather than repeating a verdict it does not own.
idsubject_kindWhat is being registered.
sms_sender: a sender registered to send to one country.number: a phone number you hold that needs ownership paperwork before it can carry traffic.identity: a business you operate as, registered once and reused by later registrations that name it.
Possible values: sms_sender, number, identity
subject_idWhat is being registered. For sms_sender this is the scr_ id returned when you register a sender for a country. For number it is the nda_ id of a dedicated number you hold, as returned by GET /v1/numbers. A shared short code (nal_) is not accepted: it is shared, so its ownership paperwork is not yours to file. For identity it is the cid_ id of the party being registered, picked from the parties your workspace holds, as returned by GET /v1/compliance/identities.
programThe registration program a country runs. Available programs depend on the registered resource. An SMS sender registers under an authority regime (alpha or numeric). A phone number proves ownership under its number type (mobile, local, national, short_code, short_code_fteu, or toll_free), matching the values of NumberType. An identity registers your business itself under business, internationally: its coordinate's country is always ZZ. A value is therefore only meaningful alongside the subject it describes. More are added as coverage grows, so treat this as an open set rather than a fixed list.
Possible values (may grow over time): alpha, numeric, mobile, local, national, short_code, short_code_fteu, toll_free, business
country_codeISO 3166-1 alpha-2 country code.
identity_idThe party this registration was filed for, or null if none was named.
satisfiedWhether this country's requirements are met. true once the submission is approved and every required requirement is approved or marked not applicable. This can remain true when an external verifier requests a correction. Once you submit that correction, it must pass review before this becomes true again, including any optional answers you change.
itemsEvery answer and where it stands. Each is decided on its own.
Mostrar atributos secundarios
items.inheritedtrue when this answer was accepted without a fresh review, because the same answer to the same requirement had already been approved for this party in this country. It carries the original verdict, including when that verdict expires.
items.iditems.keyThe requirement this answers.
items.stateWhere one requirement stands. The not_supplied state means nothing has been
given for it yet. The supplied state means we have your answer and review
has not started. The in_review state means someone is looking at it. The
approved and rejected states are decisions. You can replace a rejected
item without refiling the rest. The not_applicable state means this
requirement does not apply to you. The expired state means the value was
accepted but has since gone stale.
An item only ever reports its state. Treat this as an open set because review can gain stages. A value you do not recognise is a valid state that this server added.
Possible values (may grow over time): not_supplied, supplied, in_review, approved, rejected, not_applicable, expired
items.valueYour answer, for a requirement answered inline. Every answer travels as a string whatever its data type, so a number reads back as "1500" and a yes-or-no as "true". Use the data type to parse it. null for a requirement that takes a document.
items.attachment_idThe document you supplied, for a requirement that takes one. null otherwise.
items.valuesYour answers, for a requirement that takes several and is answered inline. null for one answered once. Order is as you sent it.
items.attachment_idsThe documents you supplied, for a requirement that takes several. null otherwise.
items.reasonWhy this was rejected, when it was. null otherwise.
items.decided_atWhen this was decided. null while no decision has been made.
items.expires_atWhen this answer goes stale and must be supplied again. null when it does not expire.
created_atWhen this was submitted.
updated_atWhen it last changed.
closed_atWhen this submission was closed. Null while it remains open.
closure_reasonThe decline reason for a closed submission, or null while open.
Recursos relacionados
Continúa con la documentación, guías y ejemplos de este tema.