# Queue ledger

## Queues a ledger for ERP integration.

> Transitions ledger to Queued status, initiating ERP integration processing.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5243-ga0bb7c09"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/billing/ledgers/{id}/queue":{"post":{"tags":["Ledgers"],"summary":"Queues a ledger for ERP integration.","description":"Transitions ledger to Queued status, initiating ERP integration processing.","parameters":[{"name":"id","in":"path","description":"The ID of the ledger to queue.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The ledger data to be updated before action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ledger"}},"text/json":{"schema":{"$ref":"#/components/schemas/Ledger"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Ledger"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ledger"}}}},"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":{"Ledger":{"type":"object","properties":{"audit":{"allOf":[{"$ref":"#/components/schemas/LedgerAuditBag"}],"description":"Represents a container for audit-related events for a ledger"},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the ledger."},"journal":{"type":"object","allOf":[{"$ref":"#/components/schemas/JournalRef"}]},"status":{"allOf":[{"$ref":"#/components/schemas/LedgerStatus"}],"description":"The current status of the ledger."},"authorization":{"type":"object","allOf":[{"$ref":"#/components/schemas/AuthorizationRef"}]},"owner":{"type":"object","allOf":[{"$ref":"#/components/schemas/SellerRef"}]},"seller":{"type":"object","allOf":[{"$ref":"#/components/schemas/SellerRef"}]},"product":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProductRef"}]},"assignee":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]},"price":{"allOf":[{"$ref":"#/components/schemas/LedgerPriceSummary"}],"description":"Pricing details associated with the ledger."},"processing":{"allOf":[{"$ref":"#/components/schemas/ProcessingSummary"}],"description":"Processing status and related details for the ledger, visible to operations."},"error":{"allOf":[{"$ref":"#/components/schemas/BillingError"}],"description":"Error details associated with the ledger, if any.","nullable":true},"backup":{"allOf":[{"$ref":"#/components/schemas/BackupDetails"}],"description":"Backup details for the ledger."}},"additionalProperties":false,"description":"Represents a ledger in the billing system."},"LedgerAuditBag":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"rating":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the ledger reached the \"Rating\" status.","nullable":true},"error":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the ledger reached the \"Error\" status.","nullable":true},"review":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the ledger reached the \"Review\" status.","nullable":true},"generating":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the ledger reached the \"Generating\" status.","nullable":true},"generated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the ledger reached the \"Generated\" status.","nullable":true},"queued":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the ledger reached the \"Queued\" status.","nullable":true},"completed":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the ledger reached the \"Completed\" status.","nullable":true}},"additionalProperties":false,"description":"Represents a container for audit-related events for a ledger"},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"JournalRef":{"type":"object","properties":{"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the journal entry."},"name":{"type":"string","description":"Name of the journal."},"dueDate":{"type":"string","description":"The due date for the journal entry.","format":"date-time"}},"additionalProperties":false,"description":"Represents a journal entry in the billing system."},"LedgerStatus":{"enum":["Rating","Error","Review","Generating","Generated","Queued","Completed"],"type":"string","description":"Represents the various statuses a ledger can have in the billing system."},"AuthorizationRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"currency":{"type":"string"}},"additionalProperties":false},"SellerRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalId":{"type":"string","nullable":true}},"additionalProperties":false},"ProductRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalIds":{"allOf":[{"$ref":"#/components/schemas/ProductExternalIdBag"}]},"status":{"type":"string"}},"additionalProperties":false},"ProductExternalIdBag":{"type":"object","properties":{"operations":{"type":"string","nullable":true},"defaultErpItem":{"type":"string","nullable":true}},"additionalProperties":false},"LedgerPriceSummary":{"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":{"type":"string","description":"Specifies the currency for the pricing."}},"additionalProperties":false,"description":"Represents a detailed summary of pricing for a ledger."},"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":{}}}}}
```
