# Accept custom ledger

## Accepts a custom ledger.

> Transitions custom ledger to Accepted status, finalizing charges and generating statements.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5520-g4a7cef27"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/billing/custom-ledgers/{id}/accept":{"post":{"tags":["CustomLedgers"],"summary":"Accepts a custom ledger.","description":"Transitions custom ledger to Accepted status, finalizing charges and generating statements.","parameters":[{"name":"id","in":"path","description":"The ID of the custom ledger to accept.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The custom ledger data to be updated before action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomLedger"}},"text/json":{"schema":{"$ref":"#/components/schemas/CustomLedger"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CustomLedger"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomLedger"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"CustomLedger":{"type":"object","properties":{"audit":{"allOf":[{"$ref":"#/components/schemas/CustomLedgerAuditBag"}],"description":"Represents a container for audit-related events for a custom ledger"},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the custom ledger."},"name":{"type":"string","description":"Name of the custom ledger."},"externalIds":{"allOf":[{"$ref":"#/components/schemas/BillingExternalIds"}],"description":"External identifiers associated with the custom ledger."},"seller":{"allOf":[{"$ref":"#/components/schemas/Seller"}],"description":"The seller associated with the custom ledger."},"vendor":{"allOf":[{"$ref":"#/components/schemas/Account"}],"description":"The vendor associated with the custom ledger."},"billingStartDate":{"type":"string","description":"The start date of the billing period for the custom ledger.","format":"date-time"},"billingEndDate":{"type":"string","description":"The end date of the billing period for the custom ledger.","format":"date-time"},"notes":{"type":"string","description":"Additional notes or comments about the custom ledger.","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/CustomLedgerStatus"}],"description":"The current status of the custom ledger."},"assignee":{"allOf":[{"$ref":"#/components/schemas/PlatformIdentity"}],"description":"The user assigned to the custom ledger, if applicable.","nullable":true},"price":{"allOf":[{"$ref":"#/components/schemas/CustomLedgerPriceSummary"}],"description":"Pricing details associated with the custom ledger."},"processing":{"allOf":[{"$ref":"#/components/schemas/ProcessingSummary"}],"description":"Processing status and related details for the custom ledger, visible to operations."},"error":{"allOf":[{"$ref":"#/components/schemas/BillingError"}],"description":"Error details associated with the custom ledger, if any.","nullable":true},"backup":{"allOf":[{"$ref":"#/components/schemas/BackupDetails"}],"description":"Backup details for the custom ledger."}},"additionalProperties":false,"description":"Represents a custom ledger in the billing system."},"CustomLedgerAuditBag":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"draft":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the custom ledger reached the \"Draft\" status.","nullable":true},"deleted":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the custom ledger reached the \"Deleted\" status.","nullable":true},"validating":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the custom ledger reached the \"Validating\" status.","nullable":true},"validated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the custom ledger reached the \"Validated\" status.","nullable":true},"error":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the custom ledger reached the \"Error\" status.","nullable":true},"generating":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the custom ledger reached the \"Generating\" status.","nullable":true},"generated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the custom ledger reached the \"Generated\" status.","nullable":true},"queued":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the custom ledger reached the \"Queued\" status.","nullable":true},"completed":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the custom ledger reached the \"Completed\" status.","nullable":true}},"additionalProperties":false,"description":"Represents a container for audit-related events for a custom ledger"},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"allOf":[{"$ref":"#/components/schemas/PlatformIdentity"}],"nullable":true}},"additionalProperties":false},"PlatformIdentity":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformObjectAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"BillingExternalIds":{"type":"object","properties":{"operations":{"type":"string","description":"Represents the identifier used for operations in the billing system.","nullable":true},"vendor":{"type":"string","description":"Represents the identifier used for vendors in the billing system.","nullable":true}},"additionalProperties":false,"description":"Represents external identifiers associated with billing entities."},"Seller":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalId":{"type":"string","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/SellerStatus"}],"nullable":true},"currencies":{"type":"array","items":{"$ref":"#/components/schemas/SellerCurrency"},"nullable":true},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}]},"erpLink":{"allOf":[{"$ref":"#/components/schemas/ErpLink"}],"nullable":true}},"additionalProperties":false},"SellerStatus":{"enum":["Active","Disabled","Offline","Deleted"],"type":"string"},"SellerCurrency":{"type":"object","properties":{"value":{"type":"string"},"billingEnabled":{"type":"boolean"},"isDefault":{"type":"boolean"}},"additionalProperties":false},"Address":{"type":"object","properties":{"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"postCode":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true}},"additionalProperties":false},"ErpLink":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/ErpLinkAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"buyer":{"allOf":[{"$ref":"#/components/schemas/Buyer"}]},"seller":{"allOf":[{"$ref":"#/components/schemas/Seller"}]},"companyName":{"type":"string","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ErpLinkStatus"}]},"note":{"type":"string","nullable":true},"externalIds":{"allOf":[{"$ref":"#/components/schemas/BuyerExternalIds"}],"nullable":true},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"shipTo":{"type":"array","items":{"$ref":"#/components/schemas/ErpLinkAddress"},"nullable":true},"billTo":{"type":"array","items":{"$ref":"#/components/schemas/ErpLinkAddress"},"nullable":true}},"additionalProperties":false},"ErpLinkAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"blocked":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"unblocked":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"Buyer":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/BuyerAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalIds":{"allOf":[{"$ref":"#/components/schemas/BuyerExternalIds"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/BuyerStatus"}],"nullable":true},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"taxId":{"type":"string","nullable":true},"account":{"allOf":[{"$ref":"#/components/schemas/Account"}],"nullable":true},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ParametrisedMessage"},"nullable":true},"sellers":{"type":"array","items":{"$ref":"#/components/schemas/Seller"},"nullable":true}},"additionalProperties":false},"BuyerAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"activated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"unassigned":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"disabled":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"BuyerExternalIds":{"type":"object","properties":{"erpCompanyContact":{"type":"string","nullable":true},"erpCustomer":{"type":"string","nullable":true},"accountExternalId":{"type":"string","nullable":true}},"additionalProperties":false},"BuyerStatus":{"enum":["Active","Enabled","Disabled","Deleted","Unassigned","Conflict","Mismatch"],"type":"string"},"Account":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}],"nullable":true},"externalIds":{"allOf":[{"$ref":"#/components/schemas/AccountExternalIds"}],"nullable":true},"externalId":{"type":"string","nullable":true},"externalName":{"type":"string","nullable":true},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}]},"technicalSupportEmail":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"groups":{"type":"array","items":{"$ref":"#/components/schemas/UserGroup"},"nullable":true},"eligibility":{"allOf":[{"$ref":"#/components/schemas/Eligibility"}],"nullable":true},"defaultLanguageCode":{"type":"string","nullable":true}},"additionalProperties":false},"AccountType":{"enum":["Client","Vendor","Operations"],"type":"string"},"AccountStatus":{"enum":["Active","Enabled","Disabled"],"type":"string"},"AccountExternalIds":{"type":"object","properties":{"pyraTenantId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"UserGroup":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"description":{"type":"string","nullable":true},"account":{"allOf":[{"$ref":"#/components/schemas/Account"}]},"modules":{"type":"array","items":{"$ref":"#/components/schemas/Module"}},"logo":{"type":"string","nullable":true},"isDefault":{"type":"boolean"},"users":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"extensions":{"type":"array","items":{"$ref":"#/components/schemas/PlatformObjectAuditPlatformExtension"},"nullable":true},"buyers":{"type":"array","items":{"$ref":"#/components/schemas/Buyer"},"nullable":true}},"additionalProperties":false},"Module":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"description":{"type":"string"},"code":{"type":"string"},"accountTypes":{"type":"array","items":{"type":"string"}},"filters":{"allOf":[{"$ref":"#/components/schemas/Filters"}],"nullable":true},"settings":{"allOf":[{"$ref":"#/components/schemas/ModuleSettings"}],"nullable":true}},"additionalProperties":false},"Filters":{"type":"object","properties":{"group.buyers":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"ModuleSettings":{"type":"object","properties":{"sharedAccount":{"type":"boolean","deprecated":true},"configurable":{"type":"boolean"},"default":{"type":"boolean"},"paid":{"type":"boolean"},"type":{"type":"array","items":{"type":"string"}},"obsolete":{"type":"boolean"},"eligibility":{"allOf":[{"$ref":"#/components/schemas/ModuleSettingsEligibility"}],"nullable":true}},"additionalProperties":false},"ModuleSettingsEligibility":{"type":"object","properties":{"multi":{"type":"boolean"},"single":{"type":"boolean"}},"additionalProperties":false},"User":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/UserAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"email":{"type":"string"},"status":{"type":"string"},"phone":{"allOf":[{"$ref":"#/components/schemas/PhoneNumber"}],"nullable":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"lastLoginAt":{"type":"string","format":"date-time","nullable":true},"settings":{"allOf":[{"$ref":"#/components/schemas/UserSettings"}],"nullable":true},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"currentAccount":{"allOf":[{"$ref":"#/components/schemas/Account"}],"nullable":true}},"additionalProperties":false},"UserAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"invitationAcceptedAt":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"PhoneNumber":{"type":"object","properties":{"prefix":{"type":"string","nullable":true},"number":{"type":"string","nullable":true}},"additionalProperties":false},"UserSettings":{"type":"object","properties":{"cultureCode":{"type":"string"},"dateFormat":{"type":"string","nullable":true},"languageCode":{"type":"string"},"numberFormat":{"allOf":[{"$ref":"#/components/schemas/NumberFormat"}],"nullable":true},"timeFormat":{"type":"string","nullable":true},"timeZone":{"type":"string","nullable":true}},"additionalProperties":false},"NumberFormat":{"type":"object","properties":{"decimalSeparator":{"type":"string"},"groupSeparator":{"type":"string"}},"additionalProperties":false},"PlatformObjectAuditPlatformExtension":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}],"nullable":true},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"status":{"enum":["Draft","Private","Public","Deleted"],"type":"string"}},"additionalProperties":false},"Eligibility":{"type":"object","properties":{"client":{"type":"boolean"},"partner":{"type":"boolean"}},"additionalProperties":false},"ParametrisedMessage":{"type":"object","properties":{"id":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"parameters":{"nullable":true}},"additionalProperties":false},"ErpLinkStatus":{"enum":["Active","Blocked"],"type":"string"},"ErpLinkAddress":{"type":"object","properties":{"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"postCode":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"additionalProperties":false},"CustomLedgerStatus":{"enum":["Draft","Deleted","Validating","Validated","Error","Generating","Generated","Queued","Completed"],"type":"string","description":"Represents the various statuses a custom ledger can have in the billing system."},"CustomLedgerPriceSummary":{"type":"object","properties":{"markup":{"type":"number","description":"Represents the markup value applied to the pricing.","format":"double"},"margin":{"type":"number","description":"Represents the margin value calculated for the pricing.","format":"double"},"totalPP":{"type":"number","description":"Represents the total purchase price.","format":"double"},"totalBSP":{"type":"number","description":"Represents the total sale price in buyer currency.","format":"double"},"currency":{"allOf":[{"$ref":"#/components/schemas/PriceCurrency"}],"description":"Specifies the currency details for the pricing, including purchase and sale values."},"totalSP":{"type":"number","description":"Represents the total sale price.","format":"double"}},"additionalProperties":false,"description":"Represents a detailed summary of pricing for a custom ledger, including currency and totals."},"PriceCurrency":{"type":"object","properties":{"purchase":{"type":"string","description":"Indicates the purchase price currency visible to vendors or operations."},"sale":{"type":"string","description":"Indicates the sale price currency visible to clients or operations."},"rate":{"type":"number","description":"Exchange rate between the purchase and sale currencies.","format":"double"}},"additionalProperties":false,"description":"Represents the currency details for pricing, including purchase and sale values."},"ProcessingSummary":{"type":"object","properties":{"total":{"type":"integer","description":"Indicates the total number of items involved in the processing.","format":"int32"},"ready":{"type":"integer","description":"Indicates the number of items that are ready for further processing.","format":"int32"},"error":{"type":"integer","description":"Indicates the number of items that encountered errors during processing.","format":"int32"},"split":{"type":"integer","description":"Indicates the number of items that were split into multiple parts during processing.","format":"int32"},"skipped":{"type":"integer","description":"Indicates the number of items that were skipped during processing.","format":"int32"},"ignored":{"type":"integer","description":"Indicates the number of items that were manually ignored.","format":"int32"}},"additionalProperties":false,"description":"Represents a summary of the processing status for various billing operations."},"BillingError":{"type":"object","properties":{"errorCode":{"type":"string","description":"Represents the error code associated with the billing entity."},"errorMessage":{"type":"string","description":"Represents the error message providing details about the issue."},"id":{"type":"string","description":"Represents the unique identifier for the error, if applicable.","nullable":true},"message":{"type":"string","description":"Represents the detailed message associated with the error, if applicable.","nullable":true}},"additionalProperties":false,"description":"Represents an error related to a billing entity."},"BackupDetails":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/BackupStatus"}],"description":"Status of the backup."},"date":{"type":"string","description":"Date and time of the backup action, if available.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents the details of a backup operation, including its status and date."},"BackupStatus":{"enum":["Pending","Exporting","Exported","Verifying","Completed","Failed","Skipped"],"type":"string","description":"Represents the status of a backup operation."},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform.softwareone.com/developer-resources/rest-api/billing-api/custom-ledger-object/accept-custom-ledger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
