Exporting Invoices
Onport allows you to automatically export Purchase Orders to Accounting Systems such as Quickbooks and Xero via its built-in integration.
There are instances in which your Accounting System may not be directly supported by Onport or be completely custom built.
In such cases, the Custom Accounting Integration capabilities of Onport are able to address this scenario.
For each Accounting Integration configured, Onport will automatically make an API call to a predefined endpoint and send the Purchase Invoice information to the External System.
Set-up
In order to register one or more Accounting Integrations, it is sufficient to make a POST call to
curl --request POST \--url https://api.jetti.io/api/accounting-integrations.json \--header 'Authorization: Bearer {{token}}' \--header 'Content-Type: application/json' \--data '{"name": "{{name of the integration}}","dropshipEndpoint": "https://serverless.example.com/functions/createInvoice"}'
It is possible to verify the list of configured custom accounting integrations via:
curl --request GET \--url https://api.jetti.io/api/accounting-integrations.json \--header 'Authorization: Bearer {{token}}' \
Please refer to Onport's API Reference for additional information.
Specifications
Onport will make POST
call to the Dropship Endpoint and send a JSON Request Body with a comprehensive payload containing the Purchase Invoices and other relevant information.
Below is an example payload:
{"taxRate": {"id": 422,"companyId": 2729,"name": "PT VAT","stateTaxRate": 0.23,"cityTaxRate": null,"countyTaxRate": null,"districtTaxRate": null,"stateTaxLocation": "Portugal","cityTaxLocation": null,"countyTaxLocation": null,"districtTaxLocation": null,"xeroId": null,"createdAt": "2022-10-11T11:24:27.274Z","updatedAt": "2022-10-11T11:24:27.274Z"},"order": {"billingFullName": "","inventoryStatus": "shipped","isDropship": true,"shippingFullName": "","shippingExpectedAt": null,"deliveryExpectedAt": null,"paymentExpectedAt": null,"total": 0,"subtotal": 0,"discounts": 0,"tax": 0,"combinedTaxRate": "0.2300","billingName": "billing name","billingAddressLineOne": "Via Napoli","billingAddressLineTwo": null,"billingCity": "Bitonto","billingState": "BA","billingCountry": "IT","billingZip": "70032","shippingName": null,"shippingAddressLineOne": null,"shippingAddressLineTwo": null,"shippingCity": null,"shippingState": "Agrigento","shippingCountry": "IT","shippingZip": null,"receiverName": null,"receiverAddressLineOne": null,"receiverAddressLineTwo": null,"receiverCity": null,"receiverState": null,"receiverCountry": null,"receiverZip": null,"id": 3557909,"companyId": 2729,"userId": null,"priceListId": 3172,"warehouseId": null,"vendorId": null,"dropshipProviderId": 18453,"dropshipProviderAddressId": null,"purchaseId": null,"saleId": 7712760,"purchaseStatusId": null,"purchaseImportExternalId": null,"files": null,"lastPurchaseInvoiceReference": 1,"lastDropshipmentReference": 1,"lastGoodsReceiptReference": 0,"purchaseType": "automated_dropship","shipmentRouting": "customer","dropshipNotes": null,"approved": true,"vendorReference": null,"sendSource": null,"vendorReceivedStatus": "received","vendorReceivedStatusReason": "sent","labelProblem": null,"orderProblem": null,"pauseProblems": null,"returnLabelProblem": null,"invoiceProblem": null,"internalReference": null,"vendorReceivedId": "12332425","vendorReceivedReference": "#1456","vendorEndpointFormat": "json","vendorEndpointResponse": null,"vendorEndpointHeaders": null,"reminderSent": false,"reminderLastSent": null,"shippingRateError": null,"orderSplitting": "group","splitTag": null,"orderSplittingKey": null,"adjustmentReasonId": null,"reference": "10152-01","locked": false,"finalized": true,"cancelled": false,"cancelledAt": null,"dateOrdered": "2024-04-15T15:06:40.007Z","taxCalculation": "default","taxShipping": true,"taxIncluded": true,"weight": 0,"quantity": 0,"stateTaxRate": 0.23,"cityTaxRate": null,"countyTaxRate": null,"districtTaxRate": null,"stateTaxLocation": null,"cityTaxLocation": null,"countyTaxLocation": null,"paymentStatus": "notPaid","invoiceStatus": "invoiced","returnStatus": "notReturned","cancellationStatus": "none","notes": null,"customerReference": null,"tags": null,"billingFirstName": null,"billingLastName": null,"shippingFirstName": null,"shippingLastName": null,"invalidShippingAddress": false,"shippingAddressMessage": false,"invalidBillingAddress": false,"billingAddressMessage": null,"createdAt": "2024-04-15T15:06:40.007Z","updatedAt": "2024-04-15T15:07:04.927Z","muteError": false,"adminNotes": null,"intercomMessageId": null,"dropship_provider": {"displayName": "vendor","name": "vendor","paypalEmail": null,"authenticationToken": "","authenticationSecret": null,"shipstationPartnerKey": null,"taxJarToken": null,"shippoToken": null,"id": 18453,"companyId": 2729,"userId": 28274,"companyReferralId": null,"shippingRateId": 15259,"returnShippingRateId": 15259,"paymentMethodId": 13454,"taxRateId": 422,"shippingTaxRateId": null,"currencyId": 4432,"platformCurrencyId": null,"commissionTaxRateId": null,"commissionPriceInventoryFeedId": null,"platformTaxRateId": null,"dropshipProviderAddressId": null,"returnDropshipProviderAddressId": null,"platformStateCode": "none","platformDiscount": "disabled","platformTaxIncluded": "purchase","taxNumber": null,"shipmentRouting": "customer","externalPaymentStatus": "onOrder","paymentModule": "enabled","syncOrderWeight": false,"syncOrderTax": true,"externalId": null,"externalPaymentId": null,"defaultAddress": "default","defaultReturnAddress": "default","labelName": null,"status": "accepted","orderSetupStatus": "pending","orderSetupStatusMessage": "You need to enter .","inventorySetup": "feed","inventoryRouting": null,"importAdjustments": null,"inventorySetupStatus": "complete","inventorySetupStatusMessage": null,"shippingSetupStatus": "pending","shippingSetupStatusMessage": "A valid address is needed to generate shipping rates","paymentSetupStatus": "complete","paymentSetupStatusMessage": null,"useChannelShippingRate": true,"shippingRates": null,"timezone": null,"websiteUrl": null,"xeroId": null,"quickbooksId": null,"zohoId": null,"transferwiseRecipientId": null,"stripeId": null,"stripeFlow": "manual","stripePayout": "retailer","stripePayoutSource": "balance","stripeManagedId": null,"stripeManaged": false,"stripeManagedEnabled": false,"ostUser": null,"payAutomatically": true,"paymentSchedule": "daily","paymentScheduler": "default","paymentDayMonthly": "firstDay","monthlyPaymentDay": 1,"paymentDay": "monday","paymentDays": 30,"anyVendor": false,"requireInventoryFeedVariant": false,"emailCopy": false,"shippingReminderAdmin": null,"paymentNotes": null,"w9Form": null,"isValid": true,"validationMessage": null,"silenceAlerts": null,"defaultShippingCode": null,"purchaseNotes": "","orderPlatform": "shopify","orderFormat": "csv","orderTemplateType": "default","orderFlattenSeperator": null,"internalNotes": null,"orderEndpointUrl": "subdomain.myshopify.com","shippingUpdateExtension": null,"shippingUpdateSchedule": "default","shippingUpdateExtensionDuration": 0,"shippingEndpoint": "","shipmentFetchFrequency": "daily","shippingEndpointImportSeconds": 1,"shippingEndpointProblem": {},"shippingEndpointLastFetchedAt": "2023-12-20T17:03:55.107Z","shippingEndpointFormat": "googleSheet","shippingEndpointPurpose": "all","shippingEndpointMapping": "default","shippingEndpointGrouping": "order","ftpShipmentImportType": "single","ftpShipmentImportDelimiter": null,"automaticallyPickup": null,"magentoStoreId": null,"magentoAgreementId": null,"orderLanguageCode": null,"orderCurrencyCode": null,"orderCarrierCode": null,"prestashopShopGroupId": null,"orderStatusCode": null,"paymentCode": "bogus","paymentMessage": null,"orderEndpointPath": "test","orderUseProxy": null,"orderTemplateId": 1016,"invoiceTemplateId": null,"invoiceTerms": null,"transferTerms": null,"sendingSchedule": "immediate","sendingScheduleHour": "9","sendingScheduleMinute": "0","dailyEmailBatches": "split","sendTransferNotification": null,"sendOrderNotification": false,"sendReminder": false,"updateOrderNotes": false,"reminderDays": null,"includeOrderSummary": true,"includeCustomerEmail": "companyUnique","includeCustomerPhone": false,"combineRates": false,"shippingPhone": "company","shippingEmail": "company","returnInHouse": false,"returnLabels": "manual","customCarriers": "selected","returnShipmentTrigger": "any","returnLabelType": "paid","syncExternalReturns": true,"platformExportReturns": "always","saleReturnCustomerStatus": "default","saleReturnRefundTrigger": "none","countries": null,"countryFilter": "all","skus": null,"skuFilter": "all","productTypes": null,"productTypeFilter": "all","tags": [],"tagFilter": "all","phone": "","returnsPolicy": null,"terms": null,"firstName": "Mario","lastName": "Rossi","minimumOrderRequirements": null,"receiverRequired": null,"orderMinimum": null,"orderMinimumAmount": null,"internalTags": ["test"],"addressLineOne": "1600 Test Avenue","addressLineTwo": "","city": "Washington","state": "DC","country": "PT","zip": "20500","generateShippingLabels": false,"shippingType": "generateShippingLabels","purchaseShippingLabelAutomatically": false,"automaticallySendLabel": false,"labelRouting": "bestMatch","labelScope": "all","labelCountries": null,"labelError": "prevent","includeLabelInPackingSlip": false,"includePackingSlip": true,"includeCustomerInvoice": "none","includeInvoice": false,"labelFormat": "pdf","requiresShippingApproval": false,"invoicingStage": "afterShipping","invoiceNotification": "none","invoiceShipping": false,"invoiceShippingType": "deduct","invoiceShippingSource": "transaction","invoiceShippingSources": null,"invoiceShippingEligibility": "all","invoiceShippingTax": false,"shippingTaxRateScope": "all","shippingTaxRateCountries": [],"calculateCostPrices": true,"commissionMethod": "reverse","commissionRateBase": "saleItem","commissionReverseTaxIncluded": null,"commissionGrossTax": false,"invoiceIssuer": "dropshipProvider","packingSlipFromLabel": "orderedFrom","commissionRate": "20.00","commissionRateType": "percentage","commissionRateShipping": "0.00","commissionRateFixedType": "deduct_by","useCommissionRateEndpoint": true,"commissionRateEndpoint": "","commissionRateEndpointHash": "secret","commissionRateDiscount": null,"commissionRateDiscountSplit": "100.00","commissionRateDiscountScope": "all","commissionRateDiscountCodes": null,"ignoreCostPriceAlerts": false,"enablePublishing": true,"taxCalculation": "manual","invoiceTaxSource": "order","commissionTaxCalculation": "disabled","taxShipping": true,"taxIncluded": true,"setMerchantReference": null,"platformNotification": "default","platformLocation": null,"platformNotes": false,"platformTrackingRequirement": "disabled","platformTrackingCompanyRequirement": "disabled","platformTags": [],"syncDropshipTag": true,"syncCompanyTag": true,"syncReferenceTag": true,"platformCustomerExternalId": "","platformProducts": "connected","platformShippingCost": false,"platformShippingPrice": true,"platformShippingMapping": "default","platformShippingMappingFallback": "default","platformShippingProvider": null,"platformShippingServiceLevel": null,"platformShippingCode": null,"platformTax": "default","platformPrice": "inventoryFeed","platformPriceFallback": "sale","platformPriceListId": null,"platformProperties": "default","platformInvoiceAddress": "customer","defaultWeight": 10,"defaultWeightUnit": "g","packagingWeight": 0,"applyDiscountCode": false,"discountCode": null,"trackingScope": null,"orderSplitting": "group","orderSplittingEndpoint": "","tagSplitting": [],"addressRouting": "default","useDropshipmentSplittingEndpoint": false,"dropshipmentSplittingEndpoint": "","taxId": "","eoriNumber": null,"useInternalReferenceTemplate": false,"internalReferenceTemplate": null,"internalReferenceTemplateDateFormat": null,"usePdfEndpoint": false,"pdfEndpoint": null,"syncInternalShipmentsToPlatform": false,"vendorPortalShowInvoices": true,"useGeneratePayloadEndpoint": false,"generatePayloadEndpoint": "","restrictionTags": [],"restrictionTagsScope": "enabled","restrictionDays": 0,"restrictionDaysScope": "enabled","reverseShippingInvoice": "dropshipProvider","applyReturnPenalty": "disabled","createdAt": "2021-04-20T07:16:34.456Z","updatedAt": "2024-04-15T15:10:42.182Z","muteError": false,"adminNotes": null,"intercomMessageId": null},"vendor": null,"sale": {"billingFullName": "","shippingFullName": "","displayName": "10152","total": 0,"subtotal": 0,"discounts": 0,"tax": 0,"combinedTaxRate": "0.0000","billingName": null,"billingAddressLineOne": null,"billingAddressLineTwo": null,"billingCity": null,"billingState": "Agrigento","billingCountry": "IT","billingZip": null,"shippingName": null,"shippingAddressLineOne": null,"shippingAddressLineTwo": null,"shippingCity": null,"shippingState": "Agrigento","shippingCountry": "IT","shippingZip": null,"receiverName": null,"receiverAddressLineOne": null,"receiverAddressLineTwo": null,"receiverCity": null,"receiverState": null,"receiverCountry": null,"receiverZip": null,"id": 7712760,"companyId": 2729,"userId": 29226,"priceListId": 3172,"channelId": 4981,"currencyId": null,"warehouseId": 2999,"customerId": 1368214,"saleDiscountCodeId": null,"saleId": null,"resellerId": null,"cloneReason": null,"externalId": null,"externalChannelSiteId": null,"lastPurchaseReference": 2,"lastSaleReturnReference": 0,"lastFulfillmentReference": 0,"status": "finalized","internalNotes": null,"inventoryStatus": "fulfilled","cancelReason": null,"channelCancelledAt": null,"shipstationId": null,"paid": null,"dropshipProblems": [],"resellerStripeChargeId": null,"resellerPayee": "reseller","exchangeRate": null,"iso": null,"paymentProviderIds": [],"adjustmentReasonId": null,"reference": "10152","locked": false,"finalized": false,"cancelled": false,"cancelledAt": null,"dateOrdered": "2024-04-15T15:06:23.864Z","taxCalculation": "default","taxShipping": true,"taxIncluded": false,"weight": 0,"quantity": 0,"stateTaxRate": null,"cityTaxRate": null,"countyTaxRate": null,"districtTaxRate": null,"stateTaxLocation": null,"cityTaxLocation": null,"countyTaxLocation": null,"paymentStatus": "notPaid","invoiceStatus": "notInvoiced","returnStatus": "notReturned","cancellationStatus": "none","notes": null,"customerReference": null,"tags": ["dropship"],"billingFirstName": null,"billingLastName": null,"shippingFirstName": null,"shippingLastName": null,"invalidShippingAddress": false,"shippingAddressMessage": null,"invalidBillingAddress": false,"billingAddressMessage": null,"createdAt": "2024-04-15T15:06:23.865Z","updatedAt": "2024-04-15T17:00:57.311Z","muteError": false,"adminNotes": null,"intercomMessageId": null,"customer": {"displayName": "","email": "mariorossi@mailinator.com","firstName": "Mario","lastName": "Rossi","id": 1368214,"companyId": 2729,"resellerId": null,"priceListId": null,"userId": null,"name": "","token": null,"status": "active","tags": null,"quickbooksId": null,"saleNotes": null,"stripeId": null,"companyCode": null,"taxNumber": null,"phone": "","fax": null,"notes": null,"xeroId": null,"orderEmail": null,"returnsEmail": null,"accountsEmail": null,"createdAt": "2021-03-23T10:39:59.754Z","updatedAt": "2021-03-23T10:39:59.754Z"}}},"orderItems": [{"price": 10,"subtotal": 10,"variantId": 21009777,"quantity": 1,"name": "Product 1234","commissionRetained": "-56.12","commissionTaxRetained": "0.00","commissionTaxRate": "0.00","variant": {"sku": "SKU1234","accountingSync": "active"}}],"shippingItems": []}
Onport will expect a 200
/ 201
HTTP Response Code and a Response Body containing the ID of the Purchase Invoice created in the External System, as per the payload below:
{"externalId":"46845965456"}