Compatibility with the official SDKs

Copy Markdown View Source

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.

BehaviorUpstream referenceElixir tests
Configurable Go SDK User-AgentGo api/configuration.gotransport_test.exs
Bearer authorization and encoded path parametersGo api/client.go, TypeScript src/api/*transport_test.exs, contract_test.exs
JSON code exchange and refresh, with a client secret for Authorization Code FlowGo oauth2/oauth2_authorization_code.go, TypeScript src/oauth2/oauth2-authorization-code-manager.tsoauth_test.exs
Device code inside data and device refresh without a client secretGo oauth2/oauth2_device_code.go, TypeScript src/oauth2/oauth2-device-code-manager.tsoauth_test.exs
Flat OAuth responses and error_descriptionGo oauth2/oauth2.go, TypeScript OAuth manager, provider guidesoauth_test.exs
XML preserved as a stringGo api/client.go, TypeScript test/api/IssuedEInvoicesApi.spec.tstransport_test.exs
Null, false, zero, dates, and decimal numbers preserved on the wireGo model/*, TypeScript test/api/IssuedDocumentsApi.spec.tstransport_test.exs, sdk_parity_test.exs
Separate multipart fields for filename and attachmentTypeScript src/api/issued-documents-api.ts, Go attachment APIcontract_test.exs, sdk_parity_test.exs
Null, boolean, numeric, and string filters with nested AND/ORGo filter/* and test/filter/*, TypeScript src/filter/* and test/filter/*filter_test.exs
Full pagination envelopeTypeScript test/api/ClientsApi.spec.ts, OpenAPIpagination_test.exs, sdk_parity_test.exs
Complete error details, including SdI validationGo GenericOpenAPIError, OpenAPItransport_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.Unmarshal into 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.deserialize constructed a generated model for 24 examples and failed for two. A separate local HTTP experiment passed the nine request objects directly to ApiClient.callApi and 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
ExamplesGo modelsJavaScript modelsTypeScript transport
createCashbookEntry response with a numeric IDRejects the numeric IDConverts the ID to a string and the date to a DatePreserves the JSON
Numeric VAT ei_type in create, modify, and get operations, getClientInfo, and getTaxProfileRejects the numberConverts it to a stringPreserves the JSON
listVatTypes response with a string e_invoiceRejects the stringConverts it to truePreserves the JSON
getEInvoiceRejectionReason with a date without a timeRequires an RFC 3339 timestampConverts the value to a DatePreserves the string
getIssuedDocumentPreCreateInfo with null numberingRe-encodes it as zeroAccepts it and may omit unmodeled fieldsPreserves all fields and null
getReceiptPreCreateInfo with nested numbering objectsExpects integersAccepts objectsPreserves the JSON
listClients with a null payment methodDecodes a nil pointer and omits the field on re-encodeOmits the field on re-encodePreserves the field and null
listF24 with a total encoded as a stringExpects a numberConverts it with parseFloatPreserves the string
listPendingReceivedDocuments with type expenseRejects the enum valueAccepts the value and may omit unmodeled fieldsPreserves the JSON
listUserCompanies with a numeric VAT IDExpects a stringConverts it to a stringPreserves the number
Subscription create, list, and modify with legacy events or string warningsRejects the enum values and string warningsAccepts the enum values and fails during data.map for both string warningsPreserves the JSON
Cashbook create and modify, issued document create, received document totals, and F24 create and modify with missing required fieldsOptional model fields are omitted on re-encodeConstructs models and converts some dates to DateSends 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 reportRecorded behaviorElixir regression coverage
TypeScript #19, empty e-invoice body, closed December 5, 2022The maintainer reported a service validation change and restoration of the previous behavior. Maintainer responsenil, %{}, 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, 2022The maintainer confirmed a fix for the mismatch between camelCase types and snake_case JSON. Maintainer responseCode exchange and refresh read access_token, refresh_token, and expires_in from Req responses.
TypeScript PR #46, Device Code Flow, merged June 17, 2024The 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, 2024The merged fix awaits the Promise before constructing the result. PR #82The 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, 2026The 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, 2025The 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