Invoice

Retrieves the collection of Invoice resources.

Retrieves the collection of Invoice resources.

SecurityBearer
Request
query Parameters
page
integer
Default: 1

The collection page number

createdAt
string
invoiceDate
string
invoiceCreatorNip
string
invoiceRecipientNip
string
invoiceType
string
invoiceNumber
string
status
integer
direction
string
invoiceStatus
string
order[createdAt]
string
Enum: "asc" "desc"
order[invoiceDate]
string
Enum: "asc" "desc"
order[invoiceCreatorNip]
string
Enum: "asc" "desc"
order[invoiceRecipientNip]
string
Enum: "asc" "desc"
order[invoiceType]
string
Enum: "asc" "desc"
order[invoiceNumber]
string
Enum: "asc" "desc"
order[status]
string
Enum: "asc" "desc"
Responses
200

Invoice collection

400
401
404
get/invoices
Request samples
Response samples
{
  • "hydra:member": [
    ],
  • "hydra:totalItems": 0,
  • "hydra:view": {
    },
  • "hydra:search": {
    }
}

Send Invoice.

This endpoint allows you to send an invoice (json or xml format based on the Content-Type header) to the KSeF.

SecurityBearer
Request
Request Body schema:

The new Invoice resource

object (TNaglowekType)
object (Podmiot1AType)
object (Podmiot2AType)
Array of objects (Podmiot3AType)

Gets as podmiot3

object (PodmiotUpowaznionyAType)
object (FaAType)
object (StopkaAType)
Responses
201

Invoice resource created

400

Invalid input

422

Unprocessable entity

post/invoices
Request samples
{
  • "naglowek": {
    },
  • "podmiot1": {
    },
  • "podmiot2": {
    },
  • "podmiot3": [
    ],
  • "podmiotUpowazniony": {
    },
  • "fa": {
    },
  • "stopka": {
    }
}
Response samples
application/json
{
  • "uuid": "string",
  • "legalEntityUUID": "string",
  • "createdAt": "string",
  • "invoiceDate": "string",
  • "invoiceNumber": "string",
  • "senderName": "string",
  • "recipientName": "string",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceType": "string",
  • "status": "string",
  • "error": "string",
  • "direction": "string",
  • "acquisition": "string",
  • "ksefReferenceNumber": "string",
  • "hasUpo": true,
  • "attachments": [
    ]
}

Send Invoice with attachments.

This endpoint allows you to send an invoice with attachments (json or xml format based on the Content-Type header) to the KSeF

SecurityBearer
Request
Request Body schema:

The new Invoice resource

object (Faktura)
Array of objects (InvoiceAttachment)
Responses
201

Invoice resource created

400

Invalid input

422

Unprocessable entity

post/invoices/attachments
Request samples
{
  • "Faktura": {
    },
  • "Attachments": [
    ]
}
Response samples
application/json
{
  • "uuid": "string",
  • "legalEntityUUID": "string",
  • "createdAt": "string",
  • "invoiceDate": "string",
  • "invoiceNumber": "string",
  • "senderName": "string",
  • "recipientName": "string",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceType": "string",
  • "status": "string",
  • "error": "string",
  • "direction": "string",
  • "acquisition": "string",
  • "ksefReferenceNumber": "string",
  • "hasUpo": true,
  • "attachments": [
    ]
}

Convert Invoice format.

Get XML or JSON version of an invoice document.

HTTP Header Content-Type must be set to application/json or application/xml accordingly with the invoice source sent to the API.

SecurityBearer
Request
Request Body schema:

The new Invoice resource

any
Responses
201

Invoice resource created

400

Invalid input

422

Unprocessable entity

post/invoices/convert
Request samples
null
Response samples
{
  • "uuid": "string",
  • "legalEntityUUID": "string",
  • "createdAt": "string",
  • "invoiceDate": "string",
  • "invoiceNumber": "string",
  • "senderName": "string",
  • "recipientName": "string",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceType": "string",
  • "status": "string",
  • "error": "string",
  • "direction": "string",
  • "acquisition": "string",
  • "ksefReferenceNumber": "string",
  • "hasUpo": true,
  • "attachments": [
    ]
}

Valid invoice.

This endpoint allows to validate the invoice.

SecurityBearer
Request
Request Body schema:

The new Invoice resource

object (TNaglowekType)
object (Podmiot1AType)
object (Podmiot2AType)
Array of objects (Podmiot3AType)

Gets as podmiot3

object (PodmiotUpowaznionyAType)
object (FaAType)
object (StopkaAType)
Responses
200

Invoice resource created

400

Invalid input

422

Unprocessable entity

post/invoices/validate
Request samples
{
  • "naglowek": {
    },
  • "podmiot1": {
    },
  • "podmiot2": {
    },
  • "podmiot3": [
    ],
  • "podmiotUpowazniony": {
    },
  • "fa": {
    },
  • "stopka": {
    }
}
Response samples
application/json
{
  • "uuid": "string",
  • "legalEntityUUID": "string",
  • "createdAt": "string",
  • "invoiceDate": "string",
  • "invoiceNumber": "string",
  • "senderName": "string",
  • "recipientName": "string",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceType": "string",
  • "status": "string",
  • "error": "string",
  • "direction": "string",
  • "acquisition": "string",
  • "ksefReferenceNumber": "string",
  • "hasUpo": true,
  • "attachments": [
    ]
}

Retrieves a Invoice resource.

Retrieves a Invoice resource.

SecurityBearer
Request
path Parameters
uuid
required
string

Resource identifier

Responses
200

Invoice resource

404

Resource not found

get/invoices/{uuid}
Request samples
Response samples
{
  • "uuid": "string",
  • "legalEntityUUID": "string",
  • "createdAt": "string",
  • "invoiceDate": "string",
  • "invoiceNumber": "string",
  • "senderName": "string",
  • "recipientName": "string",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceType": "string",
  • "status": "string",
  • "error": "string",
  • "direction": "string",
  • "acquisition": "string",
  • "ksefReferenceNumber": "string",
  • "hasUpo": true,
  • "attachments": [
    ]
}

Removes the Invoice resource.

Removes the Invoice resource.

SecurityBearer
Request
path Parameters
uuid
required
string

Resource identifier

Responses
204

Invoice resource deleted

404

Resource not found

delete/invoices/{uuid}
Request samples

Creates a Invoice resource.

Creates a Invoice resource.

SecurityBearer
Request
path Parameters
uuid
required
string

Resource identifier

Request Body schema:

The new Invoice resource

uuid
string <uuid>
legalEntity
string or null <iri-reference>
status
integer
Default: 10
invoiceNumber
string
invoiceProducedAt
string <date-time>
invoiceDate
string <date-time>
invoiceCreatorNip
string
invoiceRecipientNip
string or null
invoiceRecipientCompanyName
string or null
invoiceRecipientCustomerId
string or null
invoiceRecipientEmail
string or null
referenceNumber
string or null
elementReferenceNumber
string or null
KSeFReferenceNumber
string or null
uploadMode
string or null
(UPO.jsonld (object or null))
acquisition
string or null <date-time>
invoiceType
string
ownerId
integer
jsonFilePath
string or null
senderName
string or null
isDemo
boolean or null
originType
string
Default: "sent"
invoiceAttachments
Array of strings <iri-reference>
accessCode
string
createdAt
string <date-time>
otcCode
string or null
otcIsUsed
boolean
otcExpiredAt
string or null <date-time>
kSeFReferenceNumber
string or null
filePath
string
Responses
201

Invoice resource created

400

Invalid input

404

Resource not found

422

Unprocessable entity

post/invoices/{uuid}/activate-access-code
Request samples
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "legalEntity": "../словник",
  • "status": 10,
  • "invoiceNumber": "string",
  • "invoiceProducedAt": "2019-08-24T14:15:22Z",
  • "invoiceDate": "2019-08-24T14:15:22Z",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceRecipientCompanyName": "string",
  • "invoiceRecipientCustomerId": "string",
  • "invoiceRecipientEmail": "string",
  • "referenceNumber": "string",
  • "elementReferenceNumber": "string",
  • "KSeFReferenceNumber": "string",
  • "uploadMode": "string",
  • "upo": {
    },
  • "acquisition": "2019-08-24T14:15:22Z",
  • "invoiceType": "string",
  • "ownerId": 0,
  • "jsonFilePath": "string",
  • "senderName": "string",
  • "isDemo": true,
  • "originType": "sent",
  • "invoiceAttachments": [
    ],
  • "accessCode": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "otcCode": "string",
  • "otcIsUsed": true,
  • "otcExpiredAt": "2019-08-24T14:15:22Z",
  • "kSeFReferenceNumber": "string",
  • "filePath": "string"
}
Response samples
{
  • "@id": "string",
  • "@type": "string",
  • "@context": "string",
  • "uuid": "string",
  • "legalEntityUUID": "string",
  • "createdAt": "string",
  • "invoiceDate": "string",
  • "invoiceNumber": "string",
  • "senderName": "string",
  • "recipientName": "string",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceType": "string",
  • "status": "string",
  • "error": "string",
  • "direction": "string",
  • "acquisition": "string",
  • "ksefReferenceNumber": "string",
  • "hasUpo": true,
  • "attachments": [
    ]
}

Retrieves a Invoice resource.

Retrieves a Invoice resource.

SecurityBearer
Request
path Parameters
access_code
required
string

Access code

uuid
required
string

Resource identifier

Responses
200

Invoice resource

404

Resource not found

get/invoices/{uuid}/code/{access_code}
Request samples
Response samples
{
  • "uuid": "string",
  • "legalEntityUUID": "string",
  • "createdAt": "string",
  • "invoiceDate": "string",
  • "invoiceNumber": "string",
  • "senderName": "string",
  • "recipientName": "string",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceType": "string",
  • "status": "string",
  • "error": "string",
  • "direction": "string",
  • "acquisition": "string",
  • "ksefReferenceNumber": "string",
  • "hasUpo": true,
  • "attachments": [
    ]
}

Retrieves a Invoice resource.

Retrieves a Invoice resource.

SecurityBearer
Request
path Parameters
uuid
required
string

Resource identifier

Responses
200

Invoice resource

404

Resource not found

get/invoices/{uuid}/send-access-code
Request samples
Response samples
{
  • "@id": "string",
  • "@type": "string",
  • "@context": "string",
  • "uuid": "string",
  • "legalEntityUUID": "string",
  • "createdAt": "string",
  • "invoiceDate": "string",
  • "invoiceNumber": "string",
  • "senderName": "string",
  • "recipientName": "string",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceType": "string",
  • "status": "string",
  • "error": "string",
  • "direction": "string",
  • "acquisition": "string",
  • "ksefReferenceNumber": "string",
  • "hasUpo": true,
  • "attachments": [
    ]
}

Retrieves a Invoice resource.

Retrieves a Invoice resource.

SecurityBearer
Request
path Parameters
uuid
required
string

Resource identifier

Responses
200

Invoice resource

404

Resource not found

get/invoices/{uuid}/status
Request samples
Response samples
application/json
{
  • "uuid": "string",
  • "legalEntityUUID": "string",
  • "createdAt": "string",
  • "invoiceDate": "string",
  • "invoiceNumber": "string",
  • "senderName": "string",
  • "recipientName": "string",
  • "invoiceCreatorNip": "string",
  • "invoiceRecipientNip": "string",
  • "invoiceType": "string",
  • "status": "string",
  • "error": "string",
  • "direction": "string",
  • "acquisition": "string",
  • "ksefReferenceNumber": "string",
  • "hasUpo": true,
  • "attachments": [
    ]
}

Get invoice upo

Retrieves a Invoice resource.

SecurityBearer
Request
path Parameters
uuid
required
string

Resource identifier

Responses
200

Invoice resource

404

Resource not found

get/invoices/{uuid}/upo
Request samples