myleapp / myle
The official PHP SDK of the Myle API (https://api.myleapp.fr)
Requires
- php: >=8.2
- php-http/discovery: ^1.19
- psr/http-client: ^1.0
- psr/http-client-implementation: ^1.0
- psr/http-factory: ^1.0
- psr/http-factory-implementation: ^1.0
- psr/http-message: ^1.1 || ^2.0
Requires (Dev)
- guzzlehttp/guzzle: 7.16.1
- nyholm/psr7: 1.8.2
- phpstan/phpstan: 2.3.3
- phpunit/phpunit: 11.5.57
Suggests
- guzzlehttp/guzzle: A PSR-18 client the SDK configures with its timeout
- symfony/http-client: A PSR-18 client the SDK configures with its timeout (with nyholm/psr7)
Provides
None
Conflicts
None
Replaces
None
README
The official PHP SDK of the Myle API: typed resources (readonly classes),
one exception class per error code, auto-pagination, idempotent retries, ETag / If-Match. On any PSR-18
HTTP client. Generated from the API's OpenAPI document by sdk/generator (Apache-2.0).
SDK version 0.1.0, built against Myle-API-Version: 2026-11-21. PHP ≥ 8.2.
composer require myleapp/myle guzzlehttp/guzzle
Any PSR-18 client and PSR-17 factories work (Guzzle, Symfony HttpClient with nyholm/psr7…), found by php-http/discovery or passed to the constructor.
Quick start
use Myle\Client; $client = new Client(); // reads MYLE_API_KEY; or new Client(apiKey: '…') $me = $client->me->get(); $org = $client->organization('organization_…');
List with pagination
foreach ($org->products->list(status: 'ACTIVE') as $product) { // follows nextCursor page after page echo $product->number, ' ', $product->name, "\n"; } $page = $org->products->list(limit: 200)->firstPage(); $page->data; $page->hasMore(); $next = $page->nextPage(); $first = $org->products->list()->toArray(max: 1000);
Create
$product = $org->products->create(number: 'A0012', name: 'Foin de prairie', vatRate: '5.5', unitPrice: ['amount' => '12.50', 'currency' => 'EUR']); echo $product->id, ' ', $product->etag();
A create gets an Idempotency-Key generated once and reused by its retries: retried after a network error,
it never creates twice. Pass idempotencyKey: 'order-2026-0042' to choose it;
$product->lastResponse()->idempotentReplayed tells a replay.
Update with If-Match
$product = $org->products->get('product_…'); $updated = $org->products->update($product->id, name: 'Foin de luzerne', accountingNumber: null, ifMatch: $product);
An update is a merge patch: an argument left out is not sent (its default is Myle\NotGiven::Value), null
is sent and clears the member. ifMatch takes the resource you read or its etag: if someone changed it since,
the call throws CorePreconditionFailedException (412) and changes nothing.
Error handling
use Myle\Exception\ApiException; use Myle\Exception\ConnectionException; use Myle\Exception\CoreConflictException; try { $org->products->create(number: 'A0012', name: 'Foin', vatRate: '5.5'); } catch (CoreConflictException $e) { echo 'number taken: ', $e->context()->name; } catch (ApiException $e) { echo $e->status, ' ', $e->errorCode, ' ', $e->getMessage(), ' ', $e->requestId; } catch (ConnectionException $e) { echo 'no answer: ', $e->getMessage(); }
Files: the invoice PDF
$file = $org->invoices->downloadPdf('invoice_…'); $file->save($file->filename ?? 'invoice.pdf'); // $file->data, $file->contentType
An operation that also answers a file (getInvoice with Accept: application/pdf) has a method
of its own (downloadPdf) returning a Myle\FileDownload: its bytes as received (data),
filename (from Content-Disposition, the last path segment only), contentType and lastResponse;
save($path) writes the bytes. Its errors are JSON, thrown as usual.
The client
new Myle\Client( apiKey: '…', // default: MYLE_API_KEY (an organization or a user key, opaque) baseUrl: 'https://api.myleapp.fr', // default: MYLE_BASE_URL, else this maxRetries: 2, // network errors, 429 and 5xx (when safe to repeat) timeout: 60.0, // seconds per attempt, on the client the SDK builds apiVersion: '2026-11-21', // the Myle-API-Version sent; default: this SDK's acceptLanguage: 'fr', // the language of error messages; English by default onDeprecation: fn ($notice) => error_log($notice->operationId), // once per operation; null: silent httpClient: $psr18Client, // default: Guzzle / Symfony HttpClient / php-http/discovery );
Resources follow the API's paths: $client->organization($id)->products is /organizations/{id}/products,
$client->me is /me. A method takes the ids of its path first, then named arguments: the body's members and
the list's filters, camelCase as on the wire (vatRate, updatedAfter); idempotencyKey or ifMatch where
the operation takes them; and options: new Myle\RequestOptions(timeout: 5.0, maxRetries: 0, headers: [...], acceptLanguage: 'fr'). Nested objects are arrays with camelCase keys (typed by PHPStan array shapes); a
returned model of the same shape (Money) is accepted in their place.
Resources come back as readonly classes: typed properties, toArray() for the JSON as received (unknown members
included), get('member'), etag(), lastResponse(). Enums are open: a property typed BarcodeFormat|string
holds the case when this SDK knows the value, the string otherwise (a value added to the API later); a request
takes the case or its string.
Timeouts. PSR-18 has none. When you pass no httpClient, the SDK builds Guzzle (timeout,
connect_timeout) or Symfony HttpClient (timeout, max_duration), whichever is installed, bounding each
attempt by timeout (RequestOptions::$timeout per call); otherwise it takes the client php-http/discovery
finds, with that client's own timeouts. A client you pass keeps its own configuration. A timeout is a
Myle\Exception\TimeoutException.
Errors
Every error answer of the API is thrown as an ApiException subclass (namespace Myle\Exception): the class
of its error code, which extends the class of its HTTP status (ConflictException, NotFoundException…).
errorCode is stable, context() is typed by the code, getMessage() is the human sentence (French or English:
never parse it), requestId is what support asks for, getCode() the HTTP status. A network failure is a
ConnectionException (TimeoutException for a timeout); everything extends MyleException.
| Code | Status | Class |
|---|---|---|
core.bad-request |
400 | CoreBadRequestException |
core.api-version-unsupported |
— | CoreApiVersionUnsupportedException |
core.module-required |
402 | CoreModuleRequiredException |
core.subscription-required |
402 | CoreSubscriptionRequiredException |
core.plan-limit-reached |
402 | CorePlanLimitReachedException |
core.not-found |
404 | CoreNotFoundException |
core.method-not-allowed |
405 | CoreMethodNotAllowedException |
core.not-acceptable |
406 | CoreNotAcceptableException |
core.conflict |
409 | CoreConflictException |
core.precondition-failed |
412 | CorePreconditionFailedException |
core.payload-too-large |
413 | CorePayloadTooLargeException |
core.unsupported-media-type |
415 | CoreUnsupportedMediaTypeException |
core.validation-failed |
422 | CoreValidationFailedException |
core.idempotency-key-reused |
422 | CoreIdempotencyKeyReusedException |
core.idempotency-key-in-use |
409 | CoreIdempotencyKeyInUseException |
core.rate-limited |
429 | CoreRateLimitedException |
core.internal-error |
500 | CoreInternalErrorException |
core.bad-gateway |
502 | CoreBadGatewayException |
core.unavailable |
503 | CoreUnavailableException |
auth.credential.missing |
401 | AuthCredentialMissingException |
auth.credential.invalid |
401 | AuthCredentialInvalidException |
auth.credential.expired |
401 | AuthCredentialExpiredException |
auth.credential.revoked |
401 | AuthCredentialRevokedException |
auth.right.missing |
403 | AuthRightMissingException |
auth.email.unconfirmed |
403 | AuthEmailUnconfirmedException |
auth.session.refused |
403 | AuthSessionRefusedException |
auth.api-key.organization-not-allowed |
403 | AuthApiKeyOrganizationNotAllowedException |
auth.session.required |
403 | AuthSessionRequiredException |
auth.step-up.required |
403 | AuthStepUpRequiredException |
auth.api-key.limit-reached |
409 | AuthApiKeyLimitReachedException |
products.barcode.duplicate |
409 | ProductBarcodeDuplicateException |
products.barcode.outside-company-prefix |
422 | ProductBarcodeOutsideCompanyPrefixException |
crm.company.identifier-required |
422 | CrmCompanyIdentifierRequiredException |
crm.company.invalid-identifier |
422 | CrmCompanyInvalidIdentifierException |
crm.company.invalid-siret |
422 | CrmCompanyInvalidSiretException |
crm.company.accounting-number-taken |
409 | CrmCompanyAccountingNumberTakenException |
crm.postal-address.referenced |
409 | CrmPostalAddressReferencedException |
billing.invoice.not-a-draft |
409 | BillingInvoiceNotADraftException |
billing.invoice.stripe-imported |
409 | BillingInvoiceStripeImportedException |
billing.invoice.foreign-product |
422 | BillingInvoiceForeignProductException |
billing.invoice.out-of-scope-reference |
422 | BillingInvoiceOutOfScopeReferenceException |
billing.invoice.partial-credit-note |
409 | BillingInvoicePartialCreditNoteException |
billing.invoice.facturx-unavailable |
409 | BillingInvoiceFacturxUnavailableException |
billing.invoice.not-payable |
409 | BillingInvoiceNotPayableException |
billing.invoice.already-paid |
409 | BillingInvoiceAlreadyPaidException |
billing.invoice.credit-note-linked |
409 | BillingInvoiceCreditNoteLinkedException |
billing.payment.not-removable |
409 | BillingPaymentNotRemovableException |
billing.payment.stripe-collected |
409 | BillingPaymentStripeCollectedException |
billing.invoice.not-creditable |
409 | BillingInvoiceNotCreditableException |
billing.invoice.already-credited |
409 | BillingInvoiceAlreadyCreditedException |
billing.invoice.deposit-deducted |
409 | BillingInvoiceDepositDeductedException |
billing.invoice.einvoice-required |
409 | BillingInvoiceEinvoiceRequiredException |
billing.invoice.recipient-unsubscribed |
— | BillingInvoiceRecipientUnsubscribedException |
billing.invoice.transition-refused |
409 | BillingInvoiceTransitionRefusedException |
billing.invoice.generated-credit-note |
409 | BillingInvoiceGeneratedCreditNoteException |
billing.invoice.not-editable |
409 | BillingInvoiceNotEditableException |
billing.invoice.not-reinvoiceable |
409 | BillingInvoiceNotReinvoiceableException |
billing.invoice.already-reinvoiced |
409 | BillingInvoiceAlreadyReinvoicedException |
billing.invoice.not-a-credit-note |
409 | BillingInvoiceNotACreditNoteException |
billing.invoice.correction-fixed |
409 | BillingInvoiceCorrectionFixedException |
billing.invoice.not-correctable |
409 | BillingInvoiceNotCorrectableException |
billing.invoice.not-duplicable |
— | BillingInvoiceNotDuplicableException |
quotations.quotation.transition-refused |
409 | QuotationQuotationTransitionRefusedException |
quotations.quotation.not-extendable |
409 | QuotationQuotationNotExtendableException |
quotations.quotation.converted |
409 | QuotationQuotationConvertedException |
quotations.quotation.already-invoiced |
409 | QuotationQuotationAlreadyInvoicedException |
quotations.quotation.has-deposits |
409 | QuotationQuotationHasDepositsException |
quotations.quotation.not-editable |
409 | QuotationQuotationNotEditableException |
quotations.quotation.foreign-product |
422 | QuotationQuotationForeignProductException |
quotations.quotation.out-of-scope-reference |
422 | QuotationQuotationOutOfScopeReferenceException |
quotations.quotation.recipient-unsubscribed |
— | QuotationQuotationRecipientUnsubscribedException |
orders.order.transition-refused |
409 | OrderOrderTransitionRefusedException |
orders.order.not-deletable |
409 | OrderOrderNotDeletableException |
orders.order.not-editable |
409 | OrderOrderNotEditableException |
orders.order.foreign-product |
422 | OrderOrderForeignProductException |
orders.order.out-of-scope-reference |
422 | OrderOrderOutOfScopeReferenceException |
orders.order.already-invoiced |
409 | OrderOrderAlreadyInvoicedException |
orders.order.has-deposits |
409 | OrderOrderHasDepositsException |
orders.order.shop-billed |
409 | OrderOrderShopBilledException |
orders.order.recipient-unsubscribed |
— | OrderOrderRecipientUnsubscribedException |
einvoicing.organization.paid-plan-required |
402 | EinvoicingOrganizationPaidPlanRequiredException |
einvoicing.organization.not-subject |
409 | EinvoicingOrganizationNotSubjectException |
einvoicing.connection.not-connected |
409 | EinvoicingConnectionNotConnectedException |
einvoicing.routing-address.not-published |
422 | EinvoicingRoutingAddressNotPublishedException |
einvoicing.einvoice.not-eligible |
409 | EinvoicingEinvoiceNotEligibleException |
einvoicing.einvoice.not-retryable |
409 | EinvoicingEinvoiceNotRetryableException |
einvoicing.einvoice.credit-note-reference-missing |
409 | EinvoicingEinvoiceCreditNoteReferenceMissingException |
einvoicing.incoming-einvoice.already-settled |
409 | EinvoicingIncomingEinvoiceAlreadySettledException |
einvoicing.incoming-einvoice.not-on-platform |
409 | EinvoicingIncomingEinvoiceNotOnPlatformException |
einvoicing.incoming-einvoice.not-accepted |
409 | EinvoicingIncomingEinvoiceNotAcceptedException |
payments.account.not-connected |
409 | PaymentAccountNotConnectedException |
payments.account.demo |
409 | PaymentAccountDemoException |
payments.account.suspended |
409 | PaymentAccountSuspendedException |
payments.collection.disabled |
409 | PaymentCollectionDisabledException |
payments.collection.paused |
409 | PaymentCollectionPausedException |
payments.plan.collection-required |
402 | PaymentPlanCollectionRequiredException |
payments.mandate.missing |
409 | PaymentMandateMissingException |
payments.mandate.foreign-iban |
409 | PaymentMandateForeignIbanException |
payments.mandate.invitations-throttled |
429 | PaymentMandateInvitationsThrottledException |
payments.debit.not-debitable |
409 | PaymentDebitNotDebitableException |
payments.debit.nothing-due |
409 | PaymentDebitNothingDueException |
payments.debit.below-minimum |
409 | PaymentDebitBelowMinimumException |
payments.debit.above-maximum |
409 | PaymentDebitAboveMaximumException |
payments.debit.quota-reached |
409 | PaymentDebitQuotaReachedException |
payments.refund.nothing-to-refund |
409 | PaymentRefundNothingToRefundException |
Idempotency, retries, concurrency
- Operations that accept
Idempotency-Keyget one generated per call, reused by its retries. - Retries (
maxRetries, 2 by default): network errors and 5xx when the call is safe to repeat (GET,PUT,DELETE, or a write with an idempotency key); 429 always, afterRetry-After(seconds or an HTTP date); backoff with jitter otherwise. ARetry-Afterover 60 s is not waited for: the exception carriesretryAfter. - Every single resource comes with its
etag(); pass it, or the resource, asifMatch.
Versioning
Each SDK release pins the contract date it was generated against (Myle\Version::API_VERSION, 2026-11-21
here) and sends it as Myle-API-Version: an API change never changes what this code receives. When the API
answers an operation with an older behavior (Deprecation, Sunset), onDeprecation is called once per
operation (an E_USER_DEPRECATED by default).
Methods
$client->rights
| Method | HTTP | Summary |
|---|---|---|
list() |
GET /rights |
List the rights |
$client->products
| Method | HTTP | Summary |
|---|---|---|
search() |
GET /products |
Search the products across organizations |
$client->companies
| Method | HTTP | Summary |
|---|---|---|
search() |
GET /companies |
Search the companies across organizations |
$client->invoices
| Method | HTTP | Summary |
|---|---|---|
search() |
GET /invoices |
Search the invoices across organizations |
$client->quotations
| Method | HTTP | Summary |
|---|---|---|
search() |
GET /quotations |
Search the quotations across organizations |
$client->orders
| Method | HTTP | Summary |
|---|---|---|
search() |
GET /orders |
Search the orders across organizations |
$client->me
| Method | HTTP | Summary |
|---|---|---|
get() |
GET /me |
Get the signed-in user |
$client->me->apiKeys
| Method | HTTP | Summary |
|---|---|---|
list() |
GET /me/api-keys |
List my API keys |
create() |
POST /me/api-keys |
Create a user key |
get($apiKeyId) |
GET /me/api-keys/{apiKeyId} |
Get one of my API keys |
revoke($apiKeyId) |
DELETE /me/api-keys/{apiKeyId} |
Revoke one of my API keys |
update($apiKeyId) |
PATCH /me/api-keys/{apiKeyId} |
Change one of my API keys |
rotate($apiKeyId) |
POST /me/api-keys/{apiKeyId}/rotate |
Rotate one of my API keys |
$client->organization('organization_…')
| Method | HTTP | Summary |
|---|---|---|
get() |
GET /organizations/{id} |
Get an organization |
$client->organization('organization_…')->apiKeys
| Method | HTTP | Summary |
|---|---|---|
list() |
GET /organizations/{id}/api-keys |
List the organization's API keys |
create() |
POST /organizations/{id}/api-keys |
Create an organization key |
get($apiKeyId) |
GET /organizations/{id}/api-keys/{apiKeyId} |
Get one of the organization's API keys |
revoke($apiKeyId) |
DELETE /organizations/{id}/api-keys/{apiKeyId} |
Revoke one of the organization's API keys |
update($apiKeyId) |
PATCH /organizations/{id}/api-keys/{apiKeyId} |
Change one of the organization's API keys |
rotate($apiKeyId) |
POST /organizations/{id}/api-keys/{apiKeyId}/rotate |
Rotate one of the organization's API keys |
$client->organization('organization_…')->products
| Method | HTTP | Summary |
|---|---|---|
list() |
GET /organizations/{id}/products |
List the products |
create() |
POST /organizations/{id}/products |
Create a product |
listTags() |
GET /organizations/{id}/products/tags |
List the products' tags |
get($productId) |
GET /organizations/{id}/products/{productId} |
Get a product |
delete($productId) |
DELETE /organizations/{id}/products/{productId} |
Delete a product |
update($productId) |
PATCH /organizations/{id}/products/{productId} |
Change a product |
getNeighbors($productId) |
GET /organizations/{id}/products/{productId}/neighbors |
Get a product's neighbors in the list |
$client->organization('organization_…')->products->barcodes
| Method | HTTP | Summary |
|---|---|---|
create($productId) |
POST /organizations/{id}/products/{productId}/barcodes |
Add a barcode to a product |
get($productId, $barcodeId) |
GET /organizations/{id}/products/{productId}/barcodes/{barcodeId} |
Get a barcode of a product |
delete($productId, $barcodeId) |
DELETE /organizations/{id}/products/{productId}/barcodes/{barcodeId} |
Remove a barcode from a product |
update($productId, $barcodeId) |
PATCH /organizations/{id}/products/{productId}/barcodes/{barcodeId} |
Change a barcode of a product |
$client->organization('organization_…')->companies
| Method | HTTP | Summary |
|---|---|---|
listTags() |
GET /organizations/{id}/companies/tags |
List the companies' tags |
getNeighbors($companyId) |
GET /organizations/{id}/companies/{companyId}/neighbors |
Get a company's neighbors in a list |
list() |
GET /organizations/{id}/companies |
List the companies |
create() |
POST /organizations/{id}/companies |
Create a company |
get($companyId) |
GET /organizations/{id}/companies/{companyId} |
Get a company |
delete($companyId) |
DELETE /organizations/{id}/companies/{companyId} |
Delete a company |
update($companyId) |
PATCH /organizations/{id}/companies/{companyId} |
Change a company |
getEinvoicingRouting($companyId) |
GET /organizations/{id}/companies/{companyId}/einvoicing-routing |
Get a customer's e-invoicing routing |
replaceEinvoicingRouting($companyId) |
PUT /organizations/{id}/companies/{companyId}/einvoicing-routing |
Choose a customer's electronic address |
getSepaMandate($companyId) |
GET /organizations/{id}/companies/{companyId}/sepa-mandate |
Get a customer's SEPA mandate |
$client->organization('organization_…')->companies->emailAddresses
| Method | HTTP | Summary |
|---|---|---|
create($companyId) |
POST /organizations/{id}/companies/{companyId}/email-addresses |
Add an e-mail address to a company |
delete($companyId, $companyEmailAddressId) |
DELETE /organizations/{id}/companies/{companyId}/email-addresses/{companyEmailAddressId} |
Remove an e-mail address from a company |
update($companyId, $companyEmailAddressId) |
PATCH /organizations/{id}/companies/{companyId}/email-addresses/{companyEmailAddressId} |
Change an e-mail address of a company |
resubscribe($companyId, $companyEmailAddressId) |
POST /organizations/{id}/companies/{companyId}/email-addresses/{companyEmailAddressId}/resubscribe |
Subscribe an e-mail address of a company again |
$client->organization('organization_…')->companies->postalAddresses
| Method | HTTP | Summary |
|---|---|---|
create($companyId) |
POST /organizations/{id}/companies/{companyId}/postal-addresses |
Add a postal address to a company |
get($companyId, $postalAddressId) |
GET /organizations/{id}/companies/{companyId}/postal-addresses/{postalAddressId} |
Get a postal address of a company |
delete($companyId, $postalAddressId) |
DELETE /organizations/{id}/companies/{companyId}/postal-addresses/{postalAddressId} |
Remove a postal address from a company |
update($companyId, $postalAddressId) |
PATCH /organizations/{id}/companies/{companyId}/postal-addresses/{postalAddressId} |
Change a postal address of a company |
$client->organization('organization_…')->companies->sepaMandate
| Method | HTTP | Summary |
|---|---|---|
createInvitation($companyId) |
POST /organizations/{id}/companies/{companyId}/sepa-mandate/invitation |
Invite a customer to sign a SEPA mandate |
revoke($companyId) |
POST /organizations/{id}/companies/{companyId}/sepa-mandate/revoke |
Revoke a customer's SEPA mandate |
$client->organization('organization_…')->invoices
| Method | HTTP | Summary |
|---|---|---|
list() |
GET /organizations/{id}/invoices |
List the invoices |
create() |
POST /organizations/{id}/invoices |
Create a draft invoice |
listTags() |
GET /organizations/{id}/invoices/tags |
List the invoices' tags |
getEligibility() |
GET /organizations/{id}/invoices/eligibility |
Count what each batch would act on |
get($invoiceId) |
GET /organizations/{id}/invoices/{invoiceId} |
Get an invoice |
downloadPdf($invoiceId) |
GET /organizations/{id}/invoices/{invoiceId} (Accept: application/pdf) |
Get an invoice as a PDF file, as a FileDownload |
delete($invoiceId) |
DELETE /organizations/{id}/invoices/{invoiceId} |
Delete a draft invoice |
update($invoiceId) |
PATCH /organizations/{id}/invoices/{invoiceId} |
Change a draft invoice |
getNeighbors($invoiceId) |
GET /organizations/{id}/invoices/{invoiceId}/neighbors |
Get an invoice's neighbors in the list |
validate($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/validate |
Validate an invoice |
batchValidate() |
POST /organizations/{id}/invoices/batch-validate |
Validate several invoices |
batchShare() |
POST /organizations/{id}/invoices/batch-share |
Mark several invoices as handed to their customers |
batchCreatePayments() |
POST /organizations/{id}/invoices/batch-payments |
Record payments on several invoices |
batchCreateCreditNotes() |
POST /organizations/{id}/invoices/batch-credit-notes |
Cancel several invoices with credit notes |
batchDuplicate() |
POST /organizations/{id}/invoices/batch-duplicate |
Duplicate several invoices as drafts |
send($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/send |
Send an invoice by e-mail |
edit($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/edit |
Change a draft's lines, customer or description |
getEditability($invoiceId) |
GET /organizations/{id}/invoices/{invoiceId}/editability |
Tell whether a draft can still be changed |
share($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/share |
Mark an invoice as handed to its customer |
markLost($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/mark-lost |
Write an invoice off as lost |
unpay($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/unpay |
Take an invoice back to unpaid |
reinvoice($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/reinvoice |
Re-bill a credit note as a new draft |
setCorrectedInvoice($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/set-corrected-invoice |
Name the invoice a credit note corrects |
getEinvoice($invoiceId) |
GET /organizations/{id}/invoices/{invoiceId}/einvoice |
Get an invoice's e-invoice |
submitEinvoice($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/submit-einvoice |
Submit an invoice through the e-invoicing network |
debit($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/debit |
Debit an invoice by SEPA |
refund($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/refund |
Refund an invoice's Stripe payments |
getPaymentStatus($invoiceId) |
GET /organizations/{id}/invoices/{invoiceId}/payment-status |
Get an invoice's payment status |
$client->organization('organization_…')->invoices->creditNotes
| Method | HTTP | Summary |
|---|---|---|
create($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/credit-notes |
Cancel an invoice with a credit note |
$client->organization('organization_…')->invoices->correctableInvoices
| Method | HTTP | Summary |
|---|---|---|
list($invoiceId) |
GET /organizations/{id}/invoices/{invoiceId}/correctable-invoices |
List the invoices a credit note can correct |
$client->organization('organization_…')->invoices->statusHistory
| Method | HTTP | Summary |
|---|---|---|
list($invoiceId) |
GET /organizations/{id}/invoices/{invoiceId}/status-history |
List an invoice's status history |
$client->organization('organization_…')->invoices->payments
| Method | HTTP | Summary |
|---|---|---|
list($invoiceId) |
GET /organizations/{id}/invoices/{invoiceId}/payments |
List an invoice's payments |
create($invoiceId) |
POST /organizations/{id}/invoices/{invoiceId}/payments |
Record a payment on an invoice |
get($invoiceId, $paymentId) |
GET /organizations/{id}/invoices/{invoiceId}/payments/{paymentId} |
Get a payment of an invoice |
delete($invoiceId, $paymentId) |
DELETE /organizations/{id}/invoices/{invoiceId}/payments/{paymentId} |
Remove a payment of an invoice |
$client->organization('organization_…')->quotations
| Method | HTTP | Summary |
|---|---|---|
list() |
GET /organizations/{id}/quotations |
List the quotations |
create() |
POST /organizations/{id}/quotations |
Create a quotation |
listTags() |
GET /organizations/{id}/quotations/tags |
List the quotations' tags |
getEligibility() |
GET /organizations/{id}/quotations/eligibility |
Count what each batch would act on |
get($quotationId) |
GET /organizations/{id}/quotations/{quotationId} |
Get a quotation |
downloadPdf($quotationId) |
GET /organizations/{id}/quotations/{quotationId} (Accept: application/pdf) |
Get a quotation as a PDF file, as a FileDownload |
delete($quotationId) |
DELETE /organizations/{id}/quotations/{quotationId} |
Delete a quotation |
update($quotationId) |
PATCH /organizations/{id}/quotations/{quotationId} |
Change a quotation |
getNeighbors($quotationId) |
GET /organizations/{id}/quotations/{quotationId}/neighbors |
Get a quotation's neighbors in the list |
edit($quotationId) |
POST /organizations/{id}/quotations/{quotationId}/edit |
Change a quotation's lines, customer or description |
getEditability($quotationId) |
GET /organizations/{id}/quotations/{quotationId}/editability |
Tell whether a quotation can still be changed |
share($quotationId) |
POST /organizations/{id}/quotations/{quotationId}/share |
Mark a quotation as handed to its customer |
approve($quotationId) |
POST /organizations/{id}/quotations/{quotationId}/approve |
Record that the customer accepted a quotation |
batchShare() |
POST /organizations/{id}/quotations/batch-share |
Mark several quotations as handed to their customers |
batchApprove() |
POST /organizations/{id}/quotations/batch-approve |
Record that customers accepted several quotations |
batchOrder() |
POST /organizations/{id}/quotations/batch-order |
Turn several accepted quotations into orders |
cancel($quotationId) |
POST /organizations/{id}/quotations/{quotationId}/cancel |
Cancel a quotation (refused or withdrawn) |
extend($quotationId) |
POST /organizations/{id}/quotations/{quotationId}/extend |
Extend a quotation's validity |
order($quotationId) |
POST /organizations/{id}/quotations/{quotationId}/order |
Turn an accepted quotation into an order |
invoice($quotationId) |
POST /organizations/{id}/quotations/{quotationId}/invoice |
Bill an accepted quotation |
send($quotationId) |
POST /organizations/{id}/quotations/{quotationId}/send |
Send a quotation by e-mail |
$client->organization('organization_…')->quotations->statusHistory
| Method | HTTP | Summary |
|---|---|---|
list($quotationId) |
GET /organizations/{id}/quotations/{quotationId}/status-history |
List a quotation's status history |
$client->organization('organization_…')->orders
| Method | HTTP | Summary |
|---|---|---|
list() |
GET /organizations/{id}/orders |
List the orders |
create() |
POST /organizations/{id}/orders |
Create an order |
listTags() |
GET /organizations/{id}/orders/tags |
List the orders' tags |
getEligibility() |
GET /organizations/{id}/orders/eligibility |
Count what each batch would act on |
get($orderId) |
GET /organizations/{id}/orders/{orderId} |
Get an order |
downloadPdf($orderId) |
GET /organizations/{id}/orders/{orderId} (Accept: application/pdf) |
Get an order as a PDF file, as a FileDownload |
delete($orderId) |
DELETE /organizations/{id}/orders/{orderId} |
Delete an order |
update($orderId) |
PATCH /organizations/{id}/orders/{orderId} |
Change an order |
getNeighbors($orderId) |
GET /organizations/{id}/orders/{orderId}/neighbors |
Get an order's neighbors in the list |
edit($orderId) |
POST /organizations/{id}/orders/{orderId}/edit |
Change an order's lines, customer, delivery address or description |
getEditability($orderId) |
GET /organizations/{id}/orders/{orderId}/editability |
Tell whether an order can still be changed |
share($orderId) |
POST /organizations/{id}/orders/{orderId}/share |
Mark an order as handed to its customer |
approve($orderId) |
POST /organizations/{id}/orders/{orderId}/approve |
Record that the customer confirmed an order |
markWaitingForDelivery($orderId) |
POST /organizations/{id}/orders/{orderId}/mark-waiting-for-delivery |
Mark an order as prepared, waiting for its delivery |
cancel($orderId) |
POST /organizations/{id}/orders/{orderId}/cancel |
Cancel an order |
batchShare() |
POST /organizations/{id}/orders/batch-share |
Mark several orders as handed to their customers |
batchApprove() |
POST /organizations/{id}/orders/batch-approve |
Record that customers confirmed several orders |
getStockAvailability($orderId) |
GET /organizations/{id}/orders/{orderId}/stock-availability |
List the stocks an order's goods can leave from |
deliver($orderId) |
POST /organizations/{id}/orders/{orderId}/deliver |
Deliver an order: make its delivery note |
invoice($orderId) |
POST /organizations/{id}/orders/{orderId}/invoice |
Bill an order |
send($orderId) |
POST /organizations/{id}/orders/{orderId}/send |
Send an order by e-mail |
$client->organization('organization_…')->orders->statusHistory
| Method | HTTP | Summary |
|---|---|---|
list($orderId) |
GET /organizations/{id}/orders/{orderId}/status-history |
List an order's status history |
$client->organization('organization_…')->deliveryNotes
| Method | HTTP | Summary |
|---|---|---|
get($deliveryNoteId) |
GET /organizations/{id}/delivery-notes/{deliveryNoteId} |
Get a delivery note |
$client->organization('organization_…')->einvoicing
| Method | HTTP | Summary |
|---|---|---|
get() |
GET /organizations/{id}/einvoicing |
Get the organization's e-invoicing |
connect() |
POST /organizations/{id}/einvoicing/connect |
Start connecting the organization to SuperPDP |
disconnect() |
POST /organizations/{id}/einvoicing/disconnect |
Disconnect the organization from SuperPDP |
sync() |
POST /organizations/{id}/einvoicing/sync |
Read the verification statuses from SuperPDP |
getAddress() |
GET /organizations/{id}/einvoicing/address |
Get the organization's electronic address |
replaceAddress() |
PUT /organizations/{id}/einvoicing/address |
Choose the organization's electronic address |
$client->organization('organization_…')->einvoices
| Method | HTTP | Summary |
|---|---|---|
listOutgoingFailures() |
GET /organizations/{id}/einvoices/outgoing-failures |
List the failed submissions |
$client->organization('organization_…')->incomingEinvoices
| Method | HTTP | Summary |
|---|---|---|
list() |
GET /organizations/{id}/incoming-einvoices |
List the incoming e-invoices |
get($incomingEinvoiceId) |
GET /organizations/{id}/incoming-einvoices/{incomingEinvoiceId} |
Get an incoming e-invoice |
downloadPdf($incomingEinvoiceId) |
GET /organizations/{id}/incoming-einvoices/{incomingEinvoiceId} (Accept: application/pdf) |
Get an incoming e-invoice as a PDF file, as a FileDownload |
downloadXml($incomingEinvoiceId) |
GET /organizations/{id}/incoming-einvoices/{incomingEinvoiceId} (Accept: application/xml) |
Get an incoming e-invoice as a XML file, as a FileDownload |
accept($incomingEinvoiceId) |
POST /organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/accept |
Accept an incoming e-invoice |
refuse($incomingEinvoiceId) |
POST /organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/refuse |
Refuse an incoming e-invoice |
dispute($incomingEinvoiceId) |
POST /organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/dispute |
Dispute an incoming e-invoice |
acceptPartially($incomingEinvoiceId) |
POST /organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/accept-partially |
Accept an incoming e-invoice in part |
markPaid($incomingEinvoiceId) |
POST /organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/mark-paid |
Mark an incoming e-invoice paid |
$client->organization('organization_…')->paymentsAccount
| Method | HTTP | Summary |
|---|---|---|
get() |
GET /organizations/{id}/payments-account |
Get the organization's Stripe account |
startOnboarding() |
POST /organizations/{id}/payments-account/onboarding |
Start or resume the Stripe onboarding |
createDashboardLink() |
POST /organizations/{id}/payments-account/dashboard-link |
Open the Stripe dashboard |
getOnlinePaymentSetting() |
GET /organizations/{id}/payments-account/online-payment |
Get the online payment of invoices |
replaceOnlinePaymentSetting() |
PUT /organizations/{id}/payments-account/online-payment |
Turn the online payment of invoices on or off |
listSepaFees() |
GET /organizations/{id}/payments-account/sepa-fees |
List the SEPA debits' fees |
getSepaQuota() |
GET /organizations/{id}/payments-account/sepa-quota |
Get the SEPA quota |