# Retry failed statement

## Retries a failed statement.

> Resets statement to Generated status, allowing it to be reprocessed after a failure.

```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/statements/{id}/retry":{"post":{"tags":["Statements"],"summary":"Retries a failed statement.","description":"Resets statement to Generated status, allowing it to be reprocessed after a failure.","parameters":[{"name":"id","in":"path","description":"The ID of the statement to retry.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The statement data to be updated before action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"}},"text/json":{"schema":{"$ref":"#/components/schemas/Statement"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Statement"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"}}}},"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":{"Statement":{"type":"object","properties":{"audit":{"allOf":[{"$ref":"#/components/schemas/StatementAuditBag"}],"description":"Represents a container for audit-related events for a statement"},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the statement."},"externalIds":{"allOf":[{"$ref":"#/components/schemas/StatementExternalIds"}],"description":"Contains external identifiers associated with the statement."},"ledger":{"type":"object","allOf":[{"$ref":"#/components/schemas/LedgerRef"}]},"customLedger":{"type":"object","allOf":[{"$ref":"#/components/schemas/CustomLedgerRef"}]},"type":{"allOf":[{"$ref":"#/components/schemas/StatementType"}],"description":"Specifies the type of the statement."},"billingType":{"allOf":[{"$ref":"#/components/schemas/BillingType"}],"description":"Specifies the billing type of the statement."},"status":{"allOf":[{"$ref":"#/components/schemas/StatementStatus"}],"description":"Indicates the current status of the statement."},"client":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"buyer":{"type":"object","allOf":[{"$ref":"#/components/schemas/BuyerRef"}]},"vendor":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"seller":{"type":"object","allOf":[{"$ref":"#/components/schemas/SellerRef"}]},"product":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProductRef"}]},"agreement":{"type":"object","allOf":[{"$ref":"#/components/schemas/AgreementRef"}]},"licensee":{"type":"object","allOf":[{"$ref":"#/components/schemas/LicenseeRef"}]},"price":{"allOf":[{"$ref":"#/components/schemas/StatementPriceSummary"}],"description":"Contains the pricing summary for the statement."},"processing":{"allOf":[{"$ref":"#/components/schemas/ProcessingSummary"}],"description":"Contains the processing summary for the statement, visible to operations."},"statusNotes":{"allOf":[{"$ref":"#/components/schemas/BillingParametrisedMessage"}],"description":"Contains additional notes or messages about the status of the statement, if applicable.","nullable":true},"error":{"allOf":[{"$ref":"#/components/schemas/BillingError"}],"description":"Represents any error associated with the statement, visible to clients or operations.","nullable":true},"creditMemo":{"type":"object","allOf":[{"$ref":"#/components/schemas/CreditMemoRef"}]},"invoice":{"type":"object","allOf":[{"$ref":"#/components/schemas/InvoiceRef"}]},"backup":{"allOf":[{"$ref":"#/components/schemas/BackupDetails"}],"description":"Backup details for the statement."},"parent":{"type":"object","allOf":[{"$ref":"#/components/schemas/StatementRef"}]},"statistics":{"allOf":[{"$ref":"#/components/schemas/StatementStatistics"}],"description":"Statistics to summarize the composition of a statement.","nullable":true}},"additionalProperties":false,"description":"Represents a billing statement in the system, containing details about transactions, pricing, and associated entities."},"StatementAuditBag":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"generated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the statement reached the \"Generated\" status.","nullable":true},"queued":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the statement reached the \"Queued\" status.","nullable":true},"error":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the statement reached the \"Error\" status.","nullable":true},"cancelled":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the statement reached the \"Cancelled\" status.","nullable":true},"pending":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the statement reached the \"Pending\" status.","nullable":true},"issued":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the statement reached the \"Issued\" status.","nullable":true},"generating":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the statement reached the \"Generating\" status.","nullable":true},"consolidating":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the statement reached the \"Consolidating\" status.","nullable":true},"consolidated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the statement reached the \"Consolidated\" status.","nullable":true}},"additionalProperties":false,"description":"Represents a container for audit-related events for a statement"},"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},"StatementExternalIds":{"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},"erpId":{"type":"string","description":"Represents the identifier used in the ERP system for the statement, if applicable.","nullable":true},"client":{"type":"string","description":"Represents the identifier used for clients in the billing system.","nullable":true}},"additionalProperties":false,"description":"Represents external identifiers associated with a billing statement."},"LedgerRef":{"type":"object","properties":{"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the ledger."}},"additionalProperties":false,"description":"Represents a ledger in the billing system."},"CustomLedgerRef":{"type":"object","properties":{"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."}},"additionalProperties":false,"description":"Represents a custom ledger in the billing system."},"StatementType":{"enum":["Debit","Credit"],"type":"string","description":"Represents the type of a statement in the billing system."},"BillingType":{"enum":["Automated","Manual","Consolidated"],"type":"string","description":"Represents the type of billing process."},"StatementStatus":{"enum":["Generated","Queued","Error","Cancelled","Pending","Issued","Generating","Consolidating","Consolidated"],"type":"string","description":"Represents the various statuses a statement can have in the billing system."},"AccountRef":{"type":"object","properties":{"id":{"type":"string"},"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}},"additionalProperties":false},"AccountType":{"enum":["Client","Vendor","Operations"],"type":"string"},"AccountStatus":{"enum":["Active","Enabled","Disabled"],"type":"string"},"BuyerRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"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},"AgreementRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"status":{"allOf":[{"$ref":"#/components/schemas/AgreementStatus"}]}},"additionalProperties":false},"AgreementStatus":{"enum":["New","Draft","Provisioning","Updating","Active","Terminated","Failed","Deleted"],"type":"string"},"LicenseeRef":{"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},"StatementPriceSummary":{"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 billing statement, 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."},"BillingParametrisedMessage":{"type":"object","properties":{"message":{"type":"string","description":"Gets the message associated with the current object.","nullable":true},"parameters":{"description":"Gets the parameters associated with the current request or operation.","nullable":true}},"additionalProperties":false,"description":"Represents a message with associated parameters for use in parameterized communication or formatting scenarios."},"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."},"CreditMemoRef":{"type":"object","properties":{"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the credit memo."}},"additionalProperties":false,"description":"Represents a credit memo in the billing system."},"InvoiceRef":{"type":"object","properties":{"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the invoice."}},"additionalProperties":false,"description":"Represents an invoice entity in the billing system."},"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."},"StatementRef":{"type":"object","properties":{"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the statement."}},"additionalProperties":false,"description":"Represents a billing statement in the system, containing details about transactions, pricing, and associated entities."},"StatementStatistics":{"type":"object","properties":{"statements":{"type":"integer","description":"Gets or sets the count of child statements.","format":"int32"},"products":{"type":"integer","description":"Gets or sets the count of distinct products across child statements.","format":"int32"},"agreements":{"type":"integer","description":"Gets or sets the count of distinct agreements across child statements.","format":"int32"},"licensees":{"type":"integer","description":"Gets or sets the count of distinct licensees across child statements.","format":"int32"}},"additionalProperties":false,"description":"Counts of key dimensions derived from child statements, recalculated on consolidation changes."},"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":{}}}}}
```
