The Elixir SDK uses Req for HTTP. Its API catalog comes from the pinned OpenAPI contract. The official SDK source and tests supplied examples for authentication, filtering, and HTTP serialization.
| Behavior | Upstream reference | Elixir tests |
|---|---|---|
| Configurable Go SDK User-Agent | Go api/configuration.go | transport_test.exs |
| Bearer authorization and encoded path parameters | Go api/client.go, TypeScript src/api/* | transport_test.exs, contract_test.exs |
| JSON code exchange and refresh, with a client secret for Authorization Code Flow | Go oauth2/oauth2_authorization_code.go, TypeScript src/oauth2/oauth2-authorization-code-manager.ts | oauth_test.exs |
Device code inside data and device refresh without a client secret | Go oauth2/oauth2_device_code.go, TypeScript src/oauth2/oauth2-device-code-manager.ts | oauth_test.exs |
Flat OAuth responses and error_description | Go oauth2/oauth2.go, TypeScript OAuth manager, provider guides | oauth_test.exs |
| XML preserved as a string | Go api/client.go, TypeScript test/api/IssuedEInvoicesApi.spec.ts | transport_test.exs |
| Null, false, zero, dates, and decimal numbers preserved on the wire | Go model/*, TypeScript test/api/IssuedDocumentsApi.spec.ts | transport_test.exs, sdk_parity_test.exs |
Separate multipart fields for filename and attachment | TypeScript src/api/issued-documents-api.ts, Go attachment API | contract_test.exs, sdk_parity_test.exs |
| Null, boolean, numeric, and string filters with nested AND/OR | Go filter/* and test/filter/*, TypeScript src/filter/* and test/filter/* | filter_test.exs |
| Full pagination envelope | TypeScript test/api/ClientsApi.spec.ts, OpenAPI | pagination_test.exs, sdk_parity_test.exs |
| Complete error details, including SdI validation | Go GenericOpenAPIError, OpenAPI | transport_test.exs, sdk_parity_test.exs |
OpenAPI examples that disagree with their schemas
The pinned contract has 26 JSON media-type examples that contradict their schemas, including 17 responses and 9 requests. The local experiment report records the source JSON pointer, operation, outcome, and changed field paths for each example. Experiment results
- Go. Each example was decoded with
json.Unmarshalinto its generated model and encoded again after a successful decode. Eight decoded successfully and 18 were rejected. The SDK uses the same decoder for HTTP JSON. Go decoder - JavaScript.
ApiClient.deserializeconstructed a generated model for 24 examples and failed for two. A separate local HTTP experiment passed the nine request objects directly toApiClient.callApiand preserved all nine. JavaScript deserializer - TypeScript. A local Axios adapter ran the generated API methods with standard Axios transformations. The transport preserved the JSON in all 17 responses and all nine requests. TypeScript transport
| Examples | Go models | JavaScript models | TypeScript transport |
|---|---|---|---|
createCashbookEntry response with a numeric ID | Rejects the numeric ID | Converts the ID to a string and the date to a Date | Preserves the JSON |
Numeric VAT ei_type in create, modify, and get operations, getClientInfo, and getTaxProfile | Rejects the number | Converts it to a string | Preserves the JSON |
listVatTypes response with a string e_invoice | Rejects the string | Converts it to true | Preserves the JSON |
getEInvoiceRejectionReason with a date without a time | Requires an RFC 3339 timestamp | Converts the value to a Date | Preserves the string |
getIssuedDocumentPreCreateInfo with null numbering | Re-encodes it as zero | Accepts it and may omit unmodeled fields | Preserves all fields and null |
getReceiptPreCreateInfo with nested numbering objects | Expects integers | Accepts objects | Preserves the JSON |
listClients with a null payment method | Decodes a nil pointer and omits the field on re-encode | Omits the field on re-encode | Preserves the field and null |
listF24 with a total encoded as a string | Expects a number | Converts it with parseFloat | Preserves the string |
listPendingReceivedDocuments with type expense | Rejects the enum value | Accepts the value and may omit unmodeled fields | Preserves the JSON |
listUserCompanies with a numeric VAT ID | Expects a string | Converts it to a string | Preserves the number |
Subscription create, list, and modify with legacy events or string warnings | Rejects the enum values and string warnings | Accepts the enum values and fails during data.map for both string warnings | Preserves the JSON |
| Cashbook create and modify, issued document create, received document totals, and F24 create and modify with missing required fields | Optional model fields are omitted on re-encode | Constructs models and converts some dates to Date | Sends the original JSON |
JavaScript's generic conversion code accounts for the ID and date changes. Its receipt model explicitly allows object values for receipt numbering. Go's generated cashbook model has optional fields and a zero-argument constructor. JavaScript type conversions, JavaScript receipt model, Go cashbook model
The Elixir transport preserves decoded JSON values and unknown fields. The contract tests use the original schemas, and compatibility tests cover JSON preservation separately. These experiments ran locally against the pinned source. Provider acceptance and SdI behavior require a live account.
Upstream issues and transport regressions
| Upstream report | Recorded behavior | Elixir regression coverage |
|---|---|---|
| TypeScript #19, empty e-invoice body, closed December 5, 2022 | The maintainer reported a service validation change and restoration of the previous behavior. Maintainer response | nil, %{}, and %{data: %{}} are sent as an omitted body, empty object, and empty data envelope, respectively. An SdI submission is sent once. |
| TypeScript #14, OAuth field names, closed September 22, 2022 | The maintainer confirmed a fix for the mismatch between camelCase types and snake_case JSON. Maintainer response | Code exchange and refresh read access_token, refresh_token, and expires_in from Req responses. |
| TypeScript PR #46, Device Code Flow, merged June 17, 2024 | The PR added a device-code manager and corrected access to the response's data envelope. | OAuth.device_code/2 accepts both the enveloped response and the flat response shown in the guides. Polling remains explicit. |
| JavaScript #80, refresh returned undefined properties, closed March 7, 2024 | The merged fix awaits the Promise before constructing the result. PR #82 | The caller receives the result after the HTTP response. With managed renewal, refreshed credentials are released after a successful save. |
TypeScript #55, Supplier.ei_code and JavaScript #114, merged_in, inspected November 17, 2026 | The pinned JavaScript model copies known fields and omits merged_in. | The SDK preserves ei_code and other fields in request and response maps. |
| Go PR #46, OAuth helpers and tests, merged October 17, 2025 | The refactor added local HTTP tests for successful token and device-code requests. | Elixir tests cover successful requests, OAuth errors, expiry, concurrent renewals, persistence failures, and uncertain outcomes. |
SDK behavior beyond the generated resources
The SDK provides constant-time OAuth state validation, structured errors, read-only request retries, lazy pagination, live plan quotas, multipart streaming, and ES256 webhook verification. Filters accept the documented operators and reject unsupported quoting characters in literal strings. Query syntax, pagination, webhook notifications