Docs

Pobranie stanu i dokumentów faktury otrzymanej

  • W sandboxie
GET
/received/{id}

Od wersji 0.35.0. Faktura otrzymana przez innego klienta albo identyfikator faktury wysłanej przez klienta daje odpowiedź 404.

Autoryzacja

apiKey
headerAuthorizationBearer <token>

Klucz należy wysyłać jako token typu bearer: Authorization: Bearer <your-api-key>. Wywołanie stanu usługi jest jedynym, które nie wymaga klucza.

Parametry ścieżki

id*string

Identyfikator faktury otrzymanej w usłudze (zwracany przez POST /received).

Wzorzec^rcv_[0-9a-f]{24}$

Treść odpowiedzi

Faktura otrzymana.

application/json
  1. response

Od wersji 0.35.0. Faktura, którą klient otrzymał przez kanał, w postaci, w jakiej przyjął ją POST /received. Tak jak Invoice, nie zawiera treści faktury: ani sprzedawcy, ani nabywcy, ani kwot.

id*string
Wzorzec^rcv_[0-9a-f]{24}$
invoice_ref*string

Własny numer faktury z pliku (BT-1; FA(3) Fa/P_2), w przeciwnym razie rail_id, w przeciwnym razie identyfikator.

invoice_number?string
route*Route

Krajowy kanał przesyłania. Te same wartości co country_route w zdarzeniach statusu.

Wartość spośród"PEPPOL""PL-KSEF""RO-EFACTURA""FR-PA""DE-XRECHNUNG"
client*string
environment*string
Wartość spośród"sandbox""production"
state*string
Wartość spośród"received""validated""validation_failed"
direction*"in"
Wartość spośród"in"
rail_id?string

Własny identyfikator dokumentu w kanale, podany w POST /received.

document_sha256*string
Wzorzec^[a-f0-9]{64}$
duplicate_of?string

Tylko w POST /received, gdy dokument był już przechowywany dla klienta i kanału.

links?
errors?array<>
documents?array<>
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
curl -X GET "https://example.com/received/string" \  -H "Authorization: Bearer <your-api-key>"
{  "id": "string",  "invoice_ref": "string",  "invoice_number": "string",  "route": "PEPPOL",  "client": "string",  "environment": "sandbox",  "state": "received",  "direction": "in",  "rail_id": "string",  "document_sha256": "string",  "duplicate_of": "string",  "links": {    "self": "string",    "events": "string"  },  "errors": [    {      "code": "string"    }  ],  "documents": [    {      "kind": "received-xml",      "sha256": "string",      "href": "string"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}