# PointOfSaleApi

## Begins a new invoice.

> Use the invoice id returned to start adding invoice items with the {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.AddInvoiceItem(Nexport.WebApi.Model.v1.CreateInvoiceItemRequest)} method.> \
> Once all items and payments are recorded use the {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.CommitInvoiceTransaction(Nexport.WebApi.Model.v1.CommitInvoiceRequest)} method to complete this invoice.> \
> \###Permissions> \
> Requires the Manage Invoices permission in the> \
> given organization or an ancestor.> \
> If a purchasing group is specified, the purchasing agent must have the Group Purchasing Agent permission in the given group or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/BeginInvoiceTransaction":{"post":{"tags":["PointOfSaleApi"],"summary":"Begins a new invoice.","description":"Use the invoice id returned to start adding invoice items with the {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.AddInvoiceItem(Nexport.WebApi.Model.v1.CreateInvoiceItemRequest)} method.\r\nOnce all items and payments are recorded use the {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.CommitInvoiceTransaction(Nexport.WebApi.Model.v1.CommitInvoiceRequest)} method to complete this invoice.\r\n###Permissions\r\nRequires the Manage Invoices permission in the\r\ngiven organization or an ancestor.\r\nIf a purchasing group is specified, the purchasing agent must have the Group Purchasing Agent permission in the given group or an ancestor.","operationId":"PointOfSaleApi_BeginInvoiceTransaction","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Id of the created invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeginInvoiceTransactionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/BeginInvoiceTransactionResponse"}}}},"403":{"description":"Not authorized to manage invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceMessageRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceMessageRequest"}}},"description":"Contains purchasing user id, organization short name, and note","required":true}}}},"components":{"schemas":{"BeginInvoiceTransactionResponse":{"title":"BeginInvoiceTransactionResponse","description":"Contains the id of the created invoice","default":{"invoice_id":"12345678-1234-5678-9abc-123456789abc","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["invoice_id","api_error_entity"],"type":"object","properties":{"invoice_id":{"format":"uuid","description":"Id of the created invoice","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"CreateInvoiceMessageRequest":{"description":"Contains fields for creating an invoice","required":["purchasing_agent_id"],"type":"object","properties":{"purchasing_agent_id":{"format":"uuid","description":"Id of the purchasing agent for the invoice. This must be a user id.","type":"string"},"organization_id":{"format":"uuid","description":"Id of the organization that the invoice belongs to. Usually this is the Organization that made the sale.","type":"string"},"purchasing_group_id":{"format":"uuid","description":"Id of the organization or group that is purchasing this wholesale. This must be the ID of a Group or Organization within your NexPort directory.","type":"string"},"note":{"description":"Optional note for the invoice","type":"string"}}}}}}
```

## POST /api/v1/PointOfSaleApi/GetInvoice

> Gets an invoice and it's list of invoice items'.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/GetInvoice":{"post":{"tags":["PointOfSaleApi"],"summary":"Gets an invoice and it's list of invoice items'.","operationId":"PointOfSaleApi_GetInvoice","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"invoice_id","in":"query","description":"","required":true},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Id of the created invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInvoiceResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetInvoiceResponse"}}}},"403":{"description":"Not authorized to manage invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiNotFoundResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiNotFoundResponse"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"GetInvoiceResponse":{"title":"GetInvoiceResponse","description":"Represents an invoice that was created within nexport.","default":{"id":"12345678-1234-5678-9abc-123456789abc","purchasing_agent":"12345678-1234-5678-9abc-123456789abc","sales_agent":"12345678-1234-5678-9abc-123456789abc","state":0,"invoice_items":[],"utc_creation_date":"0001-01-01T00:00:00","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["id","purchasing_agent","sales_agent","state","invoice_items","utc_creation_date","api_error_entity"],"type":"object","properties":{"id":{"format":"uuid","type":"string"},"purchasing_agent":{"format":"uuid","description":"User ID of the user that is purchasing the items on this invoice","type":"string"},"sales_agent":{"format":"uuid","description":"User Id of the user that is selling the items","type":"string"},"state":{"format":"int32","description":"The transaction state:\r\n<para>0=Open (Not Commited)</para><para>1=Commited</para><para>-1=Failed</para>0 = Opened, 1 = Committed, -1 = Failed","enum":[0,1,-1],"type":"integer"},"invoice_items":{"description":"List of invoice items added to this invoice","type":"array","items":{"$ref":"#/components/schemas/InvoiceItemResponse"}},"utc_creation_date":{"format":"date-time","type":"string"},"utc_date_committed":{"format":"date-time","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"InvoiceItemResponse":{"description":"Details about the invoice item on the invoice","required":["id","product_id","purchasing_group_id","product_type"],"type":"object","properties":{"id":{"format":"uuid","description":"ID of the associated Invoice Item","type":"string"},"product_id":{"format":"uuid","description":"Product ID from the NexPort Catalog","type":"string"},"purchasing_group_id":{"format":"uuid","description":"ID of the Group or Organization that owns this invoice item","type":"string"},"product_type":{"format":"int32","description":"0 = Syllabus, 1 = Catalog, 2 = ShippingAndHandling, 3 = Taxes, 4 = Other, 5 = OpenEnded","enum":[0,1,2,3,4,5],"type":"integer"},"funding_pool":{"type":"string"},"utc_redemption_available_date":{"format":"date-time","description":"Redemption available date for the invoice item","type":"string"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiNotFoundResponse":{"description":"Used to describea not found type","required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## Gets the invoice item referenced by the provided invoice item id

> Will returns the invioce item and its redemption> \
> \###Permissions> \
> Requires current user to be sales agent on the associated invoice> \
> OR current user to be purchasing agent on the invoice OR> \
> the Manage Invoices permission in the invoice item's invoice organization or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/GetInvoiceItem":{"post":{"tags":["PointOfSaleApi"],"summary":"Gets the invoice item referenced by the provided invoice item id","description":"Will returns the invioce item and its redemption\r\n###Permissions\r\nRequires current user to be sales agent on the associated invoice\r\nOR current user to be purchasing agent on the invoice OR\r\nthe Manage Invoices permission in the invoice item's invoice organization or an ancestor.","operationId":"PointOfSaleApi_GetInvoiceItem","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"invoice_item_id","in":"query","description":"ID of the invoice item to retrieve.","required":true},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Id of the created invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInvoiceItemResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetInvoiceItemResponse"}}}},"403":{"description":"Not authorized to manage invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Invoice item or Invoice were not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiNotFoundResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiNotFoundResponse"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"GetInvoiceItemResponse":{"description":"Response to the GetInvoiceItem API Call","required":["invoice_item","invoice_item_redemption","api_error_entity"],"type":"object","properties":{"invoice_item":{"$ref":"#/components/schemas/InvoiceItemResponse","description":"The requested invoice item"},"invoice_item_redemption":{"$ref":"#/components/schemas/InvoiceRedemptionResponse","description":"The requested invoice item redemption"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"InvoiceItemResponse":{"description":"Details about the invoice item on the invoice","required":["id","product_id","purchasing_group_id","product_type"],"type":"object","properties":{"id":{"format":"uuid","description":"ID of the associated Invoice Item","type":"string"},"product_id":{"format":"uuid","description":"Product ID from the NexPort Catalog","type":"string"},"purchasing_group_id":{"format":"uuid","description":"ID of the Group or Organization that owns this invoice item","type":"string"},"product_type":{"format":"int32","description":"0 = Syllabus, 1 = Catalog, 2 = ShippingAndHandling, 3 = Taxes, 4 = Other, 5 = OpenEnded","enum":[0,1,2,3,4,5],"type":"integer"},"funding_pool":{"type":"string"},"utc_redemption_available_date":{"format":"date-time","description":"Redemption available date for the invoice item","type":"string"}}},"InvoiceRedemptionResponse":{"title":"InvoiceRedemptionResponse","description":"Invoice redemption information","default":{"id":"12345678-1234-5678-9abc-123456789abc","redemption_id":"12345678-1234-5678-9abc-123456789abc","invoice_item_id":"12345678-1234-5678-9abc-123456789abc","invoice_id":"12345678-1234-5678-9abc-123456789abc","redemption_type":0,"redemption_enrollment_id":"12345678-1234-5678-9abc-123456789abc","utc_redemption_date":"2015-12-25T19:25:24.731+00:00","utc_expiration_date":"2015-12-25T19:25:24.731+00:00","redemption_user_id":"12345678-1234-5678-9abc-123456789abc","redemption_user_last_name":"lname","redemption_user_first_name":"fname","redemption_user_login":"foo_login","redemption_user_email":"email@test.com","redemption_code":"ark-abcd1234","organization_id":"12345678-1234-5678-9abc-123456789abc","organization_name":"Test Organization","organization_short_name":"testorg","catalog_id":"12345678-1234-5678-9abc-123456789abc","catalog_name":"Sample name","catalog_description":"Sample description","catalog_pricing_model":2,"catalog_access_time_limit":"1.02:30:45","utc_catalog_creation_date":"2015-12-25T19:25:24.731+00:00","utc_catalog_modified_date":"2015-12-25T19:25:24.731+00:00","syllabus_id":"12345678-1234-5678-9abc-123456789abc","syllabus_title":"Sample title","syllabus_unique_name":"Sample name","syllabus_description":"Sample description","syllabus_certificate_id":"12345678-1234-5678-9abc-123456789abc","syllabus_credit_hours":3,"syllabus_section_number":"SN 101","syllabus_section_ceus":".2 CEUs","syllabus_section_duration":"2 hours","syllabus_section_objectives":"Sample objectives","utc_syllabus_creation_date":"2015-12-25T19:25:24.731+00:00","utc_syllabus_modified_date":"2015-12-25T19:25:24.731+00:00","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["redemption_id","invoice_item_id","invoice_id","organization_id","organization_name","organization_short_name","api_error_entity"],"type":"object","properties":{"redemption_id":{"format":"uuid","description":"Id of the invoice redemption","type":"string"},"invoice_item_id":{"format":"uuid","description":"Id of the invoice item this redemption corresponds to","type":"string"},"invoice_id":{"format":"uuid","description":"Id of the invoice this redemption corresponds to","type":"string"},"redemption_type":{"format":"int32","description":"Section=0;\r\nTrainingPlan=1;\r\nCatalog=2;\r\nUnknown=-1;0 = Section, 1 = TrainingPlan, 2 = Catalog, -1 = Unknown","enum":[0,1,2,-1],"type":"integer"},"redemption_enrollment_id":{"format":"uuid","description":"Id of the enrollment this redemption corresponds to","type":"string"},"utc_redemption_date":{"format":"date-time","description":"When this invoice redemption was redeemed","type":"string"},"utc_expiration_date":{"format":"date-time","description":"When this invoice redemption expires","type":"string"},"redemption_user_id":{"format":"uuid","description":"The id of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_last_name":{"description":"The last name of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_first_name":{"description":"The first name of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_login":{"description":"The login of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_email":{"description":"The email address of the user that has redeemed this invoice redemption","type":"string"},"redemption_code":{"description":"The redemption code corresponding to this redemption","type":"string"},"organization_id":{"format":"uuid","description":"Id of the organization this redemption belongs to","type":"string"},"organization_name":{"description":"Name of the organization this redemption belongs to","type":"string"},"organization_short_name":{"description":"Short name of the organization this redemption belongs to","type":"string"},"catalog_id":{"format":"uuid","description":"Id of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_name":{"description":"Name of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_description":{"description":"Description of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_pricing_model":{"format":"int32","description":"Pricing model of the catalog that the redemption belongs to\r\nNone=0;\r\nPerHourPrice=1;\r\nPerItemPrice=2;0 = None, 1 = PerHour, 2 = PerItem","enum":[0,1,2],"type":"integer"},"catalog_access_time_limit":{"description":"How long the catalog is available","type":"string"},"utc_catalog_creation_date":{"format":"date-time","description":"When the catalog was created","type":"string"},"utc_catalog_modified_date":{"format":"date-time","description":"When the catalog was last modified","type":"string"},"syllabus_id":{"format":"uuid","description":"Id of the syllabus that this redemption belongs to","type":"string"},"syllabus_title":{"description":"Title of the syllabus this redemption belongs to","type":"string"},"syllabus_unique_name":{"description":"Unique name of the syllabus this redemption belongs to","type":"string"},"syllabus_description":{"description":"Description of the syllabus this redemption belongs to","type":"string"},"syllabus_certificate_id":{"format":"uuid","description":"Id of the syllabus certificate","type":"string"},"syllabus_disable_certificates_for_student":{"description":"Whether or not syllabus certificates are disabled for the student","type":"boolean"},"syllabus_credit_hours":{"format":"","description":"Number of credit hours the syllabus is worth","type":"number"},"syllabus_section_number":{"description":"Section number of the syllabus this redemption belongs to","type":"string"},"syllabus_section_ceus":{"description":"Section CEUs of the syllabus this redemption belongs to","type":"string"},"syllabus_section_duration":{"description":"Section duration of the syllabus this redemption belongs to","type":"string"},"syllabus_section_objectives":{"description":"Section objectives of the syllabus this redemption belongs to","type":"string"},"utc_syllabus_creation_date":{"format":"date-time","description":"When the syllabus was created","type":"string"},"utc_syllabus_modified_date":{"format":"date-time","description":"When the syllabus was last modified","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiNotFoundResponse":{"description":"Used to describea not found type","required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```

## Creates a new invoice item and saves it to the database.

> \###Permissions> \
> Requires the current user> \
> to be the sales agent on the invoice. Also requires the current user to have the Add Subscriptions permission.> \
> If a purchasing group is specified, the purchasing agent must have the Group Purchasing Agent permission in the given group or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/AddInvoiceItem":{"post":{"tags":["PointOfSaleApi"],"summary":"Creates a new invoice item and saves it to the database.","description":"###Permissions\r\nRequires the current user\r\nto be the sales agent on the invoice. Also requires the current user to have the Add Subscriptions permission.\r\nIf a purchasing group is specified, the purchasing agent must have the Group Purchasing Agent permission in the given group or an ancestor.","operationId":"PointOfSaleApi_AddInvoiceItem","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"The id of the newly created invoice item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddInvoiceItemResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AddInvoiceItemResponse"}}}},"403":{"description":"Current user must be invoice sales agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceItemRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceItemRequest"}}},"description":"Contains relevant invoice item information","required":true}}}},"components":{"schemas":{"AddInvoiceItemResponse":{"title":"AddInvoiceItemResponse","description":"Contains the id of the created invoice item","default":{"invoice_item_id":"12345678-1234-5678-9abc-123456789abc","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["invoice_item_id","api_error_entity"],"type":"object","properties":{"invoice_item_id":{"format":"uuid","description":"Id of the created invoice item","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"CreateInvoiceItemRequest":{"description":"Contains fields for creating an invoice item","required":["invoice_id","product_id"],"type":"object","properties":{"invoice_id":{"format":"uuid","description":"Id of the invoice to create an invoice item for","type":"string"},"product_id":{"format":"uuid","description":"ProductId from GetCatalog/CategorySyllabi","type":"string"},"product_type":{"format":"int32","description":"Default is Syllabus.\r\nSyllabus=0;\r\nCatalog=1;\r\nShippingAndHandling=2;\r\nTaxes=3;\r\nOther=4;\r\nOpenEnded=5;0 = Syllabus, 1 = Catalog, 2 = ShippingAndHandling, 3 = Taxes, 4 = Other, 5 = OpenEnded","enum":[0,1,2,3,4,5],"type":"integer"},"cost":{"format":"","description":"Cost in USD","type":"number"},"note":{"description":"Invoice item note","type":"string"},"utc_access_expiration_date":{"format":"date-time","description":"Can be used to set the redemption expiration date once a redemption is created for this invoice item.\r\nRedemption expiration will be set based on UtcAccessExpirationDate first if it is set.","type":"string"},"access_expiration_time_limit":{"description":"Can be used to calculate the redemption expiration date once a redemption is created for this invoice item.\r\nRedemption will be set based on AccessExpirationTimeLimit if UtcAccessExpirationDate is not set.\r\nRedemption expiration date will be set to redemption date + AccessExpirationTimeLimit.","type":"string"},"subscription_org_id":{"format":"uuid","description":"Can be used to create the subscription within the specified organization for the student when the invoice item is redeemed.\r\nEnrollment associated with this invoice item will also be created for the subscription.","type":"string"},"purchasing_group_id":{"format":"uuid","description":"Used in wholesale purchases to associate invoice items with specific groups or orgs. This means the item was sold to the specified purchasing group.\r\nIf no group is specified then the purchasing group from the invoice will be used.","type":"string"},"group_membership_ids":{"description":"Can be used to create the membership within the specified groups for the student when the invoice item is redeemed.","type":"array","items":{"format":"uuid","type":"string"}},"funding_pool":{"description":"Used for organizations to group purchased items and track those groupings.","type":"string"},"utc_redemption_available_date":{"format":"date-time","description":"Used to restrict when a redemption can be created for this invoice item,\r\ni.e. redemptions can't be created until after the specified date.","type":"string"}}}}}}
```

## Creates new invoice items of the given quantity and saves them to the database.

> \###Permissions> \
> Requires the current user> \
> to be the sales agent on the invoice. Also requires the current user to have the Add Subscriptions permission.> \
> If a purchasing group is specified, the purchasing agent must have the Group Purchasing Agent permission in the given group or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/AddInvoiceItems":{"post":{"tags":["PointOfSaleApi"],"summary":"Creates new invoice items of the given quantity and saves them to the database.","description":"###Permissions\r\nRequires the current user\r\nto be the sales agent on the invoice. Also requires the current user to have the Add Subscriptions permission.\r\nIf a purchasing group is specified, the purchasing agent must have the Group Purchasing Agent permission in the given group or an ancestor.","operationId":"PointOfSaleApi_AddInvoiceItems","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"The list of ids for the newly created invoice items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddInvoiceItemsResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AddInvoiceItemsResponse"}}}},"403":{"description":"Current user must be invoice sales agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceItemsRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceItemsRequest"}}},"description":"Contains relevant invoice item information","required":true}}}},"components":{"schemas":{"AddInvoiceItemsResponse":{"title":"AddInvoiceItemsResponse","default":{"invoice_item_ids":["12345678-1234-5678-9abc-123456789abc"],"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["invoice_item_ids","api_error_entity"],"type":"object","properties":{"invoice_item_ids":{"description":"Ids of the created invoice items","type":"array","items":{"format":"uuid","type":"string"}},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"CreateInvoiceItemsRequest":{"required":["invoice_id","product_id"],"type":"object","properties":{"quantity":{"format":"int32","description":"This is the number of invoice items to create with the same information.","type":"integer"},"invoice_id":{"format":"uuid","description":"Id of the invoice to create an invoice item for","type":"string"},"product_id":{"format":"uuid","description":"ProductId from GetCatalog/CategorySyllabi","type":"string"},"product_type":{"format":"int32","description":"Default is Syllabus.\r\nSyllabus=0;\r\nCatalog=1;\r\nShippingAndHandling=2;\r\nTaxes=3;\r\nOther=4;\r\nOpenEnded=5;0 = Syllabus, 1 = Catalog, 2 = ShippingAndHandling, 3 = Taxes, 4 = Other, 5 = OpenEnded","enum":[0,1,2,3,4,5],"type":"integer"},"cost":{"format":"","description":"Cost in USD","type":"number"},"note":{"description":"Invoice item note","type":"string"},"utc_access_expiration_date":{"format":"date-time","description":"Can be used to set the redemption expiration date once a redemption is created for this invoice item.\r\nRedemption expiration will be set based on UtcAccessExpirationDate first if it is set.","type":"string"},"access_expiration_time_limit":{"description":"Can be used to calculate the redemption expiration date once a redemption is created for this invoice item.\r\nRedemption will be set based on AccessExpirationTimeLimit if UtcAccessExpirationDate is not set.\r\nRedemption expiration date will be set to redemption date + AccessExpirationTimeLimit.","type":"string"},"subscription_org_id":{"format":"uuid","description":"Can be used to create the subscription within the specified organization for the student when the invoice item is redeemed.\r\nEnrollment associated with this invoice item will also be created for the subscription.","type":"string"},"purchasing_group_id":{"format":"uuid","description":"Used in wholesale purchases to associate invoice items with specific groups or orgs. This means the item was sold to the specified purchasing group.\r\nIf no group is specified then the purchasing group from the invoice will be used.","type":"string"},"group_membership_ids":{"description":"Can be used to create the membership within the specified groups for the student when the invoice item is redeemed.","type":"array","items":{"format":"uuid","type":"string"}},"funding_pool":{"description":"Used for organizations to group purchased items and track those groupings.","type":"string"},"utc_redemption_available_date":{"format":"date-time","description":"Used to restrict when a redemption can be created for this invoice item,\r\ni.e. redemptions can't be created until after the specified date.","type":"string"}}}}}}
```

## POST /api/v1/PointOfSaleApi/AddInvoicePayment

> Creates a new invoice payment and adds it to the database. Requires the> \
> current user to be the sales agent on the invoice.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/AddInvoicePayment":{"post":{"tags":["PointOfSaleApi"],"summary":"Creates a new invoice payment and adds it to the database. Requires the\r\ncurrent user to be the sales agent on the invoice.","operationId":"PointOfSaleApi_AddInvoicePayment","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Id of the created invoice payment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddInvoicePaymentResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AddInvoicePaymentResponse"}}}},"403":{"description":"Current user must be invoice sales agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePaymentRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/InvoicePaymentRequest"}}},"description":"Contains relevant invoice payment information","required":true}}}},"components":{"schemas":{"AddInvoicePaymentResponse":{"title":"AddInvoicePaymentResponse","description":"Contains id of the created invoice payment","default":{"invoice_item_id":"12345678-1234-5678-9abc-123456789abc","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["invoice_payment_id","api_error_entity"],"type":"object","properties":{"invoice_payment_id":{"format":"uuid","description":"Id of the created invoice payment","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"InvoicePaymentRequest":{"description":"Information for creating an invoice payment","required":["invoice_id","merchant_account_id","payee_id","payment_processor","payment_processor_transaction_id","amount_usd","utc_payment_date"],"type":"object","properties":{"invoice_id":{"format":"uuid","description":"Id of the invoice that the payment is for","type":"string"},"payment_collector_id":{"format":"uuid","description":"Id of the user collecting payment (not used in 5.2; CurrentUser is used instead)","type":"string"},"merchant_account_id":{"format":"uuid","description":"Id of the account that the payment goes to","type":"string"},"payee_id":{"format":"uuid","description":"Id of user that payment is being collected from","type":"string"},"payment_processor":{"format":"int32","description":"Cash=0;\r\nCheck=1;\r\nPayPal=2;\r\nNopCommercePlugin=3;\r\nDiscountOrCoupon=4;\r\nOther=1000;0 = Cash, 1 = Check, 2 = PayPal, 3 = NopCommercePlugin, 4 = DiscountOrCoupon, 1000 = Other","enum":[0,1,2,3,4,1000],"type":"integer"},"payment_processor_transaction_id":{"description":"Id to help track the transaction information for the payment processor","type":"string"},"amount_usd":{"format":"","description":"Amount being paid","type":"number"},"utc_payment_date":{"format":"date-time","description":"Date that the payment is made","type":"string"},"note":{"description":"Optional note for the invoice payment","type":"string"}}}}}}
```

## POST /api/v1/PointOfSaleApi/AddInvoiceScheduledPayment

> Creates a new invoice scheduled payment and adds it to the database. Requires the> \
> current user to be the sales agent on the invoice.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/AddInvoiceScheduledPayment":{"post":{"tags":["PointOfSaleApi"],"summary":"Creates a new invoice scheduled payment and adds it to the database. Requires the\r\ncurrent user to be the sales agent on the invoice.","operationId":"PointOfSaleApi_AddInvoiceScheduledPayment","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Id of the created invoice scheduled payment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddInvoiceScheduledPaymentResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AddInvoiceScheduledPaymentResponse"}}}},"403":{"description":"Current user must be invoice sales agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceScheduledPaymentRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/InvoiceScheduledPaymentRequest"}}},"description":"Contains relevant invoice scheduled payment information","required":true}}}},"components":{"schemas":{"AddInvoiceScheduledPaymentResponse":{"title":"AddInvoiceScheduledPaymentResponse","description":"Contains id of the created invoice scheduled payment","default":{"invoice_scheduled_payment_id":"12345678-1234-5678-9abc-123456789abc","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["invoice_scheduled_payment_id","api_error_entity"],"type":"object","properties":{"invoice_scheduled_payment_id":{"format":"uuid","description":"Id of the created invoice scheduled payment","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"InvoiceScheduledPaymentRequest":{"description":"Information for creating an invoice scheduled payment","required":["invoice_id"],"type":"object","properties":{"invoice_id":{"format":"uuid","description":"Id of the invoice that the payment will be made to","type":"string"},"amount_usd":{"format":"","description":"Amount of the payment","type":"number"},"utc_due_date":{"format":"date-time","description":"When the payment is due","type":"string"},"note":{"description":"Optional note for the scheduled payment","type":"string"}}}}}}
```

## This method is used to complete an invoice transaction that was started using {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.BeginInvoiceTransaction(Nexport.WebApi.Model.v1.CreateInvoiceMessageRequest)}.

> This method is used to complete an invoice transaction that was started using {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.BeginInvoiceTransaction(Nexport.WebApi.Model.v1.CreateInvoiceMessageRequest)}.> \
> NOTE: the auto\_redeem functionality has been superceded by the RedeemInvoiceItem method.> \
> Use that method instead of setting auto\_redeem to true.> \
> \###Permissions> \
> Requires current user to be the sales agent on the invoice> \
> AND the Manage Invoices permission in the invoice organization or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/CommitInvoiceTransaction":{"post":{"tags":["PointOfSaleApi"],"summary":"This method is used to complete an invoice transaction that was started using {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.BeginInvoiceTransaction(Nexport.WebApi.Model.v1.CreateInvoiceMessageRequest)}.","description":"This method is used to complete an invoice transaction that was started using {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.BeginInvoiceTransaction(Nexport.WebApi.Model.v1.CreateInvoiceMessageRequest)}.\r\nNOTE: the auto_redeem functionality has been superceded by the RedeemInvoiceItem method.\r\nUse that method instead of setting auto_redeem to true.\r\n###Permissions\r\nRequires current user to be the sales agent on the invoice\r\nAND the Manage Invoices permission in the invoice organization or an ancestor.","operationId":"PointOfSaleApi_CommitInvoiceTransaction","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Invoice number and redemption codes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitInvoiceResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/CommitInvoiceResponse"}}}},"403":{"description":"Not authorized to manage invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitInvoiceRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CommitInvoiceRequest"}}},"description":"Contains relevant invoice information","required":true}}}},"components":{"schemas":{"CommitInvoiceResponse":{"title":"CommitInvoiceResponse","description":"Contains invoice redemption codes created from the CommitInvoiceTransaction method","default":{"invoice_redemption_code":"ark-abcd1234","invoice_item_redemption_codes":{"12345678-1234-5678-9abc-123456789abc":"bat-abcd1234","1234abcd-1234-abcd-1234-123456abcdef":"cat-abcd1234"},"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"invoice_redemption_code":{"description":"A unique yet friendly Invoice Number that users can reference when speaking to Customer Support","type":"string"},"invoice_item_redemption_codes":{"description":"Contains ids of invoice items and their redemption codes","type":"object","additionalProperties":{"type":"string"}},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"CommitInvoiceRequest":{"description":"Contains information for committing an invoice and creating redemptions\r\nif necessary","required":["invoice_id"],"type":"object","properties":{"invoice_id":{"format":"uuid","description":"Id of the invoice to commit","type":"string"}}}}}}
```

## Updates the invoice item associated with the invoice item id

> \###Permissions> \
> Requires current user to be sales agent on the associated invoice OR  current user to have the Manage Invoices permission in the invoice> \
> organization or an ancestor thereof.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/UpdateInvoiceItem":{"post":{"tags":["PointOfSaleApi"],"summary":"Updates the invoice item associated with the invoice item id","description":"###Permissions\r\nRequires current user to be sales agent on the associated invoice OR  current user to have the Manage Invoices permission in the invoice\r\norganization or an ancestor thereof.","operationId":"PointOfSaleApi_UpdateInvoiceItem","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Invoice redemption information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceItemResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceItemResponse"}}}},"403":{"description":"Not authorized to manage invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceItemRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceItemRequest"}}},"description":"Contains fields for updating the invoice item","required":true}}}},"components":{"schemas":{"UpdateInvoiceItemResponse":{"description":"Contains invoice redemption codes created from the CommitInvoiceTransaction method","required":["api_error_entity"],"type":"object","properties":{"invoice_item_id":{"format":"uuid","description":"Id of the invoice item updated","type":"string"},"invoice_id":{"format":"uuid","description":"Id of the associated invoice","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"UpdateInvoiceItemRequest":{"title":"UpdateInvoiceItemRequest","description":"Contains fields for redeeming an invoice item","default":{"invoice_item_id":"00000000-0000-0000-0000-000000000000","data":{"product_id":"60a62ece-67fa-4c3d-b637-423fa5b97926","product_type":0,"cost_usd":100,"utc_access_expiration_date":"2026-04-24T16:47:10.5498267Z","access_expiration_time_limit":"10.00:00:00","note":"Updated invoice item","product_code":"452345235-sdf","is_renewal":true,"subscription_org_id":"0bca6d69-aaaf-40d1-872f-9f239efa7537","group_memberships":["2f6eef5b-8a8d-4a47-86b9-4b31912d2be1"],"purchasing_group_id":"6be1dfb9-436b-4fe8-beed-258cc7aff484","funding_pool":"Accounting Funding Pool","utc_redemption_available_date":"2026-04-14T16:47:10.5498267Z"}},"type":"object","properties":{"invoice_item_id":{"format":"uuid","description":"Id of the invoice item to update","type":"string"},"data":{"$ref":"#/components/schemas/UpdatedInvoiceFields","description":"Fields to update"}}},"UpdatedInvoiceFields":{"description":"Represents the fields that can be updated for an invoice item.","type":"object","properties":{"product_id":{"format":"uuid","description":"Gets or sets the unique identifier of the product.","type":"string"},"product_type":{"format":"int32","description":"Gets or sets the type of the product.0 = Syllabus, 1 = Catalog, 2 = ShippingAndHandling, 3 = Taxes, 4 = Other, 5 = OpenEnded","enum":[0,1,2,3,4,5],"type":"integer"},"cost_usd":{"format":"","description":"Gets or sets the cost of the product in USD.","type":"number"},"utc_access_expiration_date":{"format":"date-time","description":"Gets or sets the UTC expiration date for access to the product.","type":"string"},"access_expiration_time_limit":{"description":"Gets or sets the time limit for access expiration.","type":"string"},"note":{"description":"Concatenates this note to the invoice item","type":"string"},"product_code":{"description":"Gets or sets the product code.","type":"string"},"is_renewal":{"description":"Gets or sets a value indicating whether the product is a renewal.","type":"boolean"},"subscription_org_id":{"format":"uuid","description":"Gets or sets the unique identifier of the subscription organization.","type":"string"},"group_memberships":{"description":"REPLACES group memberships associated with the invoice item.\r\nTHIS WILL DELETE EXISTING MEMBERSHIP INSTRUCTIONS","type":"array","items":{"format":"uuid","type":"string"}},"purchasing_group_id":{"format":"uuid","description":"Gets or sets the unique identifier of the purchasing group.","type":"string"},"funding_pool":{"description":"Gets or sets the funding pool associated with the invoice item.","type":"string"},"utc_redemption_available_date":{"format":"date-time","description":"Gets or sets the UTC date when redemption becomes available.","type":"string"}}}}}}
```

## Redeems the invoice item associated with the invoice item id or redemption id/code.

> \###Permissions> \
> Requires current user to be sales agent on the invoice OR current user to be> \
> purchasing agent on the invoice OR current user to have the Manage Invoices permission in the invoice> \
> organization or an ancestor thereof.> \
> In order to use the {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.ApplyInvoiceItemUpdates(Nexport.Models.PointOfSale.InvoiceItem,Nexport.WebApi.Model.v1.UpdatedInvoiceFields)} field the current user must be a sales gent or have manage invoices on the org. Purchasing agents can not update the invoice after the fact.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/RedeemInvoiceItem":{"post":{"tags":["PointOfSaleApi"],"summary":"Redeems the invoice item associated with the invoice item id or redemption id/code.","description":"###Permissions\r\nRequires current user to be sales agent on the invoice OR current user to be\r\npurchasing agent on the invoice OR current user to have the Manage Invoices permission in the invoice\r\norganization or an ancestor thereof.\r\nIn order to use the {M:NexportVirtualCampus.WebApi.v1.PointOfSaleApiController.ApplyInvoiceItemUpdates(Nexport.Models.PointOfSale.InvoiceItem,Nexport.WebApi.Model.v1.UpdatedInvoiceFields)} field the current user must be a sales gent or have manage invoices on the org. Purchasing agents can not update the invoice after the fact.","operationId":"PointOfSaleApi_RedeemInvoiceItem","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Invoice redemption information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRedemptionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/InvoiceRedemptionResponse"}}}},"403":{"description":"Not authorized to manage invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemInvoiceItemRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/RedeemInvoiceItemRequest"}}},"description":"Contains fields for redeeming the invoice item","required":true}}}},"components":{"schemas":{"InvoiceRedemptionResponse":{"title":"InvoiceRedemptionResponse","description":"Invoice redemption information","default":{"id":"12345678-1234-5678-9abc-123456789abc","redemption_id":"12345678-1234-5678-9abc-123456789abc","invoice_item_id":"12345678-1234-5678-9abc-123456789abc","invoice_id":"12345678-1234-5678-9abc-123456789abc","redemption_type":0,"redemption_enrollment_id":"12345678-1234-5678-9abc-123456789abc","utc_redemption_date":"2015-12-25T19:25:24.731+00:00","utc_expiration_date":"2015-12-25T19:25:24.731+00:00","redemption_user_id":"12345678-1234-5678-9abc-123456789abc","redemption_user_last_name":"lname","redemption_user_first_name":"fname","redemption_user_login":"foo_login","redemption_user_email":"email@test.com","redemption_code":"ark-abcd1234","organization_id":"12345678-1234-5678-9abc-123456789abc","organization_name":"Test Organization","organization_short_name":"testorg","catalog_id":"12345678-1234-5678-9abc-123456789abc","catalog_name":"Sample name","catalog_description":"Sample description","catalog_pricing_model":2,"catalog_access_time_limit":"1.02:30:45","utc_catalog_creation_date":"2015-12-25T19:25:24.731+00:00","utc_catalog_modified_date":"2015-12-25T19:25:24.731+00:00","syllabus_id":"12345678-1234-5678-9abc-123456789abc","syllabus_title":"Sample title","syllabus_unique_name":"Sample name","syllabus_description":"Sample description","syllabus_certificate_id":"12345678-1234-5678-9abc-123456789abc","syllabus_credit_hours":3,"syllabus_section_number":"SN 101","syllabus_section_ceus":".2 CEUs","syllabus_section_duration":"2 hours","syllabus_section_objectives":"Sample objectives","utc_syllabus_creation_date":"2015-12-25T19:25:24.731+00:00","utc_syllabus_modified_date":"2015-12-25T19:25:24.731+00:00","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["redemption_id","invoice_item_id","invoice_id","organization_id","organization_name","organization_short_name","api_error_entity"],"type":"object","properties":{"redemption_id":{"format":"uuid","description":"Id of the invoice redemption","type":"string"},"invoice_item_id":{"format":"uuid","description":"Id of the invoice item this redemption corresponds to","type":"string"},"invoice_id":{"format":"uuid","description":"Id of the invoice this redemption corresponds to","type":"string"},"redemption_type":{"format":"int32","description":"Section=0;\r\nTrainingPlan=1;\r\nCatalog=2;\r\nUnknown=-1;0 = Section, 1 = TrainingPlan, 2 = Catalog, -1 = Unknown","enum":[0,1,2,-1],"type":"integer"},"redemption_enrollment_id":{"format":"uuid","description":"Id of the enrollment this redemption corresponds to","type":"string"},"utc_redemption_date":{"format":"date-time","description":"When this invoice redemption was redeemed","type":"string"},"utc_expiration_date":{"format":"date-time","description":"When this invoice redemption expires","type":"string"},"redemption_user_id":{"format":"uuid","description":"The id of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_last_name":{"description":"The last name of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_first_name":{"description":"The first name of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_login":{"description":"The login of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_email":{"description":"The email address of the user that has redeemed this invoice redemption","type":"string"},"redemption_code":{"description":"The redemption code corresponding to this redemption","type":"string"},"organization_id":{"format":"uuid","description":"Id of the organization this redemption belongs to","type":"string"},"organization_name":{"description":"Name of the organization this redemption belongs to","type":"string"},"organization_short_name":{"description":"Short name of the organization this redemption belongs to","type":"string"},"catalog_id":{"format":"uuid","description":"Id of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_name":{"description":"Name of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_description":{"description":"Description of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_pricing_model":{"format":"int32","description":"Pricing model of the catalog that the redemption belongs to\r\nNone=0;\r\nPerHourPrice=1;\r\nPerItemPrice=2;0 = None, 1 = PerHour, 2 = PerItem","enum":[0,1,2],"type":"integer"},"catalog_access_time_limit":{"description":"How long the catalog is available","type":"string"},"utc_catalog_creation_date":{"format":"date-time","description":"When the catalog was created","type":"string"},"utc_catalog_modified_date":{"format":"date-time","description":"When the catalog was last modified","type":"string"},"syllabus_id":{"format":"uuid","description":"Id of the syllabus that this redemption belongs to","type":"string"},"syllabus_title":{"description":"Title of the syllabus this redemption belongs to","type":"string"},"syllabus_unique_name":{"description":"Unique name of the syllabus this redemption belongs to","type":"string"},"syllabus_description":{"description":"Description of the syllabus this redemption belongs to","type":"string"},"syllabus_certificate_id":{"format":"uuid","description":"Id of the syllabus certificate","type":"string"},"syllabus_disable_certificates_for_student":{"description":"Whether or not syllabus certificates are disabled for the student","type":"boolean"},"syllabus_credit_hours":{"format":"","description":"Number of credit hours the syllabus is worth","type":"number"},"syllabus_section_number":{"description":"Section number of the syllabus this redemption belongs to","type":"string"},"syllabus_section_ceus":{"description":"Section CEUs of the syllabus this redemption belongs to","type":"string"},"syllabus_section_duration":{"description":"Section duration of the syllabus this redemption belongs to","type":"string"},"syllabus_section_objectives":{"description":"Section objectives of the syllabus this redemption belongs to","type":"string"},"utc_syllabus_creation_date":{"format":"date-time","description":"When the syllabus was created","type":"string"},"utc_syllabus_modified_date":{"format":"date-time","description":"When the syllabus was last modified","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"RedeemInvoiceItemRequest":{"title":"RedeemInvoiceItemRequest","description":"Contains fields for redeeming an invoice item","default":{"invoice_item_id":"00000000-0000-0000-0000-000000000000","redemption_id":"00000000-0000-0000-0000-000000000000","invoice_item_redemption_code":"ark-abcd1234","redeeming_user_id":"00000000-0000-0000-0000-000000000000","redemption_action_type":0,"note":"Sample string value","remote_system_name":"Marketplace","redemption_admin_id":"00000000-0000-0000-0000-000000000000"},"required":["redeeming_user_id","product_id"],"type":"object","properties":{"invoice_item_id":{"format":"uuid","description":"Id of the invoice item to redeem","type":"string"},"redemption_id":{"format":"uuid","description":"Id of the redemption to redeem","type":"string"},"invoice_item_redemption_code":{"description":"Redemption code on the invoice item to redeem","type":"string"},"redeeming_user_id":{"format":"uuid","description":"Id of the user that is redeeming the invoice item","type":"string"},"redemption_action_type":{"format":"int32","description":"Renew redemption updates the expiration on an existing enrollment.\r\nDelete finished enrollment will also create a new enrollment.\r\nDefault is normal redemption (creates an enrollment).\r\nNormalRedemption=1;\r\nDeleteFinishedEnrollment=20;\r\nRenewRedemption=30;0 = InvalidRedemption, 1 = NormalRedemption, 20 = DeleteFinishedEnrollment, 30 = RenewRedemption, 40 = RestartEnrollment","enum":[0,1,20,30,40],"type":"integer"},"note":{"description":"Optional note to be included with the redemption creation audit log.","type":"string"},"remote_system_name":{"description":"Name of the remote system redeeming the invoice item, i.e. \"Marketplace\".","type":"string"},"redemption_admin_id":{"format":"uuid","description":"Id of the admin who assigned the redemption. Will be set to current API user if not provided.","type":"string"},"product_id":{"format":"uuid","description":"ProductId from GetCatalog/CategorySyllabi","type":"string"},"product_type":{"format":"int32","description":"Default is Syllabus.\r\nSyllabus=0;\r\nCatalog=1;\r\nShippingAndHandling=2;\r\nTaxes=3;\r\nOther=4;\r\nOpenEnded=5;0 = Syllabus, 1 = Catalog, 2 = ShippingAndHandling, 3 = Taxes, 4 = Other, 5 = OpenEnded","enum":[0,1,2,3,4,5],"type":"integer"},"invoice_updates":{"$ref":"#/components/schemas/UpdatedInvoiceFields","description":"If not null then these invoice updates will be applied prior to redeeming the invoice item.\r\n<remarks>If a redemption already exists and the redemption id is used for this then the redemption will not be updated with the new invoice item fields. This only works on invoice items that have no redemption created yet.</remarks>"}}},"UpdatedInvoiceFields":{"description":"Represents the fields that can be updated for an invoice item.","type":"object","properties":{"product_id":{"format":"uuid","description":"Gets or sets the unique identifier of the product.","type":"string"},"product_type":{"format":"int32","description":"Gets or sets the type of the product.0 = Syllabus, 1 = Catalog, 2 = ShippingAndHandling, 3 = Taxes, 4 = Other, 5 = OpenEnded","enum":[0,1,2,3,4,5],"type":"integer"},"cost_usd":{"format":"","description":"Gets or sets the cost of the product in USD.","type":"number"},"utc_access_expiration_date":{"format":"date-time","description":"Gets or sets the UTC expiration date for access to the product.","type":"string"},"access_expiration_time_limit":{"description":"Gets or sets the time limit for access expiration.","type":"string"},"note":{"description":"Concatenates this note to the invoice item","type":"string"},"product_code":{"description":"Gets or sets the product code.","type":"string"},"is_renewal":{"description":"Gets or sets a value indicating whether the product is a renewal.","type":"boolean"},"subscription_org_id":{"format":"uuid","description":"Gets or sets the unique identifier of the subscription organization.","type":"string"},"group_memberships":{"description":"REPLACES group memberships associated with the invoice item.\r\nTHIS WILL DELETE EXISTING MEMBERSHIP INSTRUCTIONS","type":"array","items":{"format":"uuid","type":"string"}},"purchasing_group_id":{"format":"uuid","description":"Gets or sets the unique identifier of the purchasing group.","type":"string"},"funding_pool":{"description":"Gets or sets the funding pool associated with the invoice item.","type":"string"},"utc_redemption_available_date":{"format":"date-time","description":"Gets or sets the UTC date when redemption becomes available.","type":"string"}}}}}}
```

## Resets the redemption and related enrollments on an Invoice Item

> Deletes any existing redemption for an Invoice Item and creates a new one> \
> Any enrollments associated with the previous redemption will be expired. This includes enrollments> \
> made via catalog based invoice items.> \
> \###Permissions> \
> You must be the purchasing agent or the sales agent on the associated invoice OR you must have the manage invoices permission on the organization that owns this invoice.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/ResetInvoiceRedemption":{"post":{"tags":["PointOfSaleApi"],"summary":"Resets the redemption and related enrollments on an Invoice Item","description":"Deletes any existing redemption for an Invoice Item and creates a new one\r\nAny enrollments associated with the previous redemption will be expired. This includes enrollments\r\nmade via catalog based invoice items.\r\n###Permissions\r\nYou must be the purchasing agent or the sales agent on the associated invoice OR you must have the manage invoices permission on the organization that owns this invoice.","operationId":"PointOfSaleApi_ResetInvoiceRedemption","parameters":[{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Redemption Successfully Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetInvoiceRedemptionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/ResetInvoiceRedemptionResponse"}}}},"403":{"description":"Not authorized to manage invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Invoice item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetInvoiceRedemptionRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/ResetInvoiceRedemptionRequest"}}},"required":true}}}},"components":{"schemas":{"ResetInvoiceRedemptionResponse":{"title":"ResetInvoiceRedemptionResponse","description":"Includes the updated Invoice and Redemption Information for the reset operation","default":{"new-redemption":{"id":"12345678-1234-5678-9abc-123456789abc","redemption_id":"12345678-1234-5678-9abc-123456789abc","invoice_item_id":"12345678-1234-5678-9abc-123456789abc","invoice_id":"12345678-1234-5678-9abc-123456789abc","redemption_type":0,"redemption_enrollment_id":"12345678-1234-5678-9abc-123456789abc","utc_redemption_date":"2015-12-25T19:25:24.731+00:00","utc_expiration_date":"2015-12-25T19:25:24.731+00:00","redemption_user_id":"12345678-1234-5678-9abc-123456789abc","redemption_user_last_name":"lname","redemption_user_first_name":"fname","redemption_user_login":"foo_login","redemption_user_email":"email@test.com","redemption_code":"ark-abcd1234","organization_id":"12345678-1234-5678-9abc-123456789abc","organization_name":"Test Organization","organization_short_name":"testorg","catalog_id":"12345678-1234-5678-9abc-123456789abc","catalog_name":"Sample name","catalog_description":"Sample description","catalog_pricing_model":2,"catalog_access_time_limit":"1.02:30:45","utc_catalog_creation_date":"2015-12-25T19:25:24.731+00:00","utc_catalog_modified_date":"2015-12-25T19:25:24.731+00:00","syllabus_id":"12345678-1234-5678-9abc-123456789abc","syllabus_title":"Sample title","syllabus_unique_name":"Sample name","syllabus_description":"Sample description","syllabus_certificate_id":"12345678-1234-5678-9abc-123456789abc","syllabus_credit_hours":3,"syllabus_section_number":"SN 101","syllabus_section_ceus":".2 CEUs","syllabus_section_duration":"2 hours","syllabus_section_objectives":"Sample objectives","utc_syllabus_creation_date":"2015-12-25T19:25:24.731+00:00","utc_syllabus_modified_date":"2015-12-25T19:25:24.731+00:00","api_error_entity":{"error_code":0,"warning_messages":[]}},"invoice-item":{"id":"00000000-0000-0000-0000-000000000000","product_type":0},"api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"new-redemption":{"$ref":"#/components/schemas/InvoiceRedemptionResponse","description":"The new redemption created after the reset. If the reset fails or no redemption is found then this will be null."},"invoice-item":{"$ref":"#/components/schemas/InvoiceItemResponse","description":"The invoice item this redemption is being reset for"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"InvoiceRedemptionResponse":{"title":"InvoiceRedemptionResponse","description":"Invoice redemption information","default":{"id":"12345678-1234-5678-9abc-123456789abc","redemption_id":"12345678-1234-5678-9abc-123456789abc","invoice_item_id":"12345678-1234-5678-9abc-123456789abc","invoice_id":"12345678-1234-5678-9abc-123456789abc","redemption_type":0,"redemption_enrollment_id":"12345678-1234-5678-9abc-123456789abc","utc_redemption_date":"2015-12-25T19:25:24.731+00:00","utc_expiration_date":"2015-12-25T19:25:24.731+00:00","redemption_user_id":"12345678-1234-5678-9abc-123456789abc","redemption_user_last_name":"lname","redemption_user_first_name":"fname","redemption_user_login":"foo_login","redemption_user_email":"email@test.com","redemption_code":"ark-abcd1234","organization_id":"12345678-1234-5678-9abc-123456789abc","organization_name":"Test Organization","organization_short_name":"testorg","catalog_id":"12345678-1234-5678-9abc-123456789abc","catalog_name":"Sample name","catalog_description":"Sample description","catalog_pricing_model":2,"catalog_access_time_limit":"1.02:30:45","utc_catalog_creation_date":"2015-12-25T19:25:24.731+00:00","utc_catalog_modified_date":"2015-12-25T19:25:24.731+00:00","syllabus_id":"12345678-1234-5678-9abc-123456789abc","syllabus_title":"Sample title","syllabus_unique_name":"Sample name","syllabus_description":"Sample description","syllabus_certificate_id":"12345678-1234-5678-9abc-123456789abc","syllabus_credit_hours":3,"syllabus_section_number":"SN 101","syllabus_section_ceus":".2 CEUs","syllabus_section_duration":"2 hours","syllabus_section_objectives":"Sample objectives","utc_syllabus_creation_date":"2015-12-25T19:25:24.731+00:00","utc_syllabus_modified_date":"2015-12-25T19:25:24.731+00:00","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["redemption_id","invoice_item_id","invoice_id","organization_id","organization_name","organization_short_name","api_error_entity"],"type":"object","properties":{"redemption_id":{"format":"uuid","description":"Id of the invoice redemption","type":"string"},"invoice_item_id":{"format":"uuid","description":"Id of the invoice item this redemption corresponds to","type":"string"},"invoice_id":{"format":"uuid","description":"Id of the invoice this redemption corresponds to","type":"string"},"redemption_type":{"format":"int32","description":"Section=0;\r\nTrainingPlan=1;\r\nCatalog=2;\r\nUnknown=-1;0 = Section, 1 = TrainingPlan, 2 = Catalog, -1 = Unknown","enum":[0,1,2,-1],"type":"integer"},"redemption_enrollment_id":{"format":"uuid","description":"Id of the enrollment this redemption corresponds to","type":"string"},"utc_redemption_date":{"format":"date-time","description":"When this invoice redemption was redeemed","type":"string"},"utc_expiration_date":{"format":"date-time","description":"When this invoice redemption expires","type":"string"},"redemption_user_id":{"format":"uuid","description":"The id of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_last_name":{"description":"The last name of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_first_name":{"description":"The first name of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_login":{"description":"The login of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_email":{"description":"The email address of the user that has redeemed this invoice redemption","type":"string"},"redemption_code":{"description":"The redemption code corresponding to this redemption","type":"string"},"organization_id":{"format":"uuid","description":"Id of the organization this redemption belongs to","type":"string"},"organization_name":{"description":"Name of the organization this redemption belongs to","type":"string"},"organization_short_name":{"description":"Short name of the organization this redemption belongs to","type":"string"},"catalog_id":{"format":"uuid","description":"Id of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_name":{"description":"Name of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_description":{"description":"Description of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_pricing_model":{"format":"int32","description":"Pricing model of the catalog that the redemption belongs to\r\nNone=0;\r\nPerHourPrice=1;\r\nPerItemPrice=2;0 = None, 1 = PerHour, 2 = PerItem","enum":[0,1,2],"type":"integer"},"catalog_access_time_limit":{"description":"How long the catalog is available","type":"string"},"utc_catalog_creation_date":{"format":"date-time","description":"When the catalog was created","type":"string"},"utc_catalog_modified_date":{"format":"date-time","description":"When the catalog was last modified","type":"string"},"syllabus_id":{"format":"uuid","description":"Id of the syllabus that this redemption belongs to","type":"string"},"syllabus_title":{"description":"Title of the syllabus this redemption belongs to","type":"string"},"syllabus_unique_name":{"description":"Unique name of the syllabus this redemption belongs to","type":"string"},"syllabus_description":{"description":"Description of the syllabus this redemption belongs to","type":"string"},"syllabus_certificate_id":{"format":"uuid","description":"Id of the syllabus certificate","type":"string"},"syllabus_disable_certificates_for_student":{"description":"Whether or not syllabus certificates are disabled for the student","type":"boolean"},"syllabus_credit_hours":{"format":"","description":"Number of credit hours the syllabus is worth","type":"number"},"syllabus_section_number":{"description":"Section number of the syllabus this redemption belongs to","type":"string"},"syllabus_section_ceus":{"description":"Section CEUs of the syllabus this redemption belongs to","type":"string"},"syllabus_section_duration":{"description":"Section duration of the syllabus this redemption belongs to","type":"string"},"syllabus_section_objectives":{"description":"Section objectives of the syllabus this redemption belongs to","type":"string"},"utc_syllabus_creation_date":{"format":"date-time","description":"When the syllabus was created","type":"string"},"utc_syllabus_modified_date":{"format":"date-time","description":"When the syllabus was last modified","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"InvoiceItemResponse":{"description":"Details about the invoice item on the invoice","required":["id","product_id","purchasing_group_id","product_type"],"type":"object","properties":{"id":{"format":"uuid","description":"ID of the associated Invoice Item","type":"string"},"product_id":{"format":"uuid","description":"Product ID from the NexPort Catalog","type":"string"},"purchasing_group_id":{"format":"uuid","description":"ID of the Group or Organization that owns this invoice item","type":"string"},"product_type":{"format":"int32","description":"0 = Syllabus, 1 = Catalog, 2 = ShippingAndHandling, 3 = Taxes, 4 = Other, 5 = OpenEnded","enum":[0,1,2,3,4,5],"type":"integer"},"funding_pool":{"type":"string"},"utc_redemption_available_date":{"format":"date-time","description":"Redemption available date for the invoice item","type":"string"}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ResetInvoiceRedemptionRequest":{"required":["invoice_item_id"],"type":"object","properties":{"invoice_item_id":{"format":"uuid","description":"Id of the invoice whose redemption is to be reset","type":"string"},"note":{"description":"Optional note to be included with the redemption creation audit log.","type":"string"},"remote_system_name":{"description":"Name of the remote system resetting the invoice item, i.e. \"Marketplace\".","type":"string"},"redemption_reset_admin_id":{"format":"uuid","description":"Id of the admin who assigned the redemption. Will be set to current Api user Id if not provided.","type":"string"}}}}}}
```

## Gets the invoice redemption information corresponding to the given id.

> Gets the invoice redemption information corresponding to the given> \
> invoice item.> \
> \###Permissions> \
> Requires current user to be sales agent on the invoice> \
> OR current user to be purchasing agent on the invoice OR> \
> the Manage Invoices permission in the invoice item's invoice organization or an ancestor.

```json
{"openapi":"3.1.1","info":{"title":"NexPort Web API","version":"v1"},"servers":[{"url":"https://www.nexportcampus.com"}],"paths":{"/api/v1/PointOfSaleApi/GetInvoiceRedemption":{"get":{"tags":["PointOfSaleApi"],"summary":"Gets the invoice redemption information corresponding to the given id.","description":"Gets the invoice redemption information corresponding to the given\r\ninvoice item.\r\n###Permissions\r\nRequires current user to be sales agent on the invoice\r\nOR current user to be purchasing agent on the invoice OR\r\nthe Manage Invoices permission in the invoice item's invoice organization or an ancestor.","operationId":"PointOfSaleApi_GetInvoiceRedemption","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"invoice_item_id","in":"query","required":true},{"schema":{"type":"string"},"name":"access_token","in":"query","description":"Use the AdminApi Authenticate method to get the access_token","required":true}],"responses":{"200":{"description":"Invoice redemption information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRedemptionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/InvoiceRedemptionResponse"}}}},"403":{"description":"Not authorized to manage invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"409":{"description":"Entity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}},"422":{"description":"Validation exception. See response body for more info.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}},"text/json":{"schema":{"$ref":"#/components/schemas/ApiResponseBase"}}}}}}}},"components":{"schemas":{"InvoiceRedemptionResponse":{"title":"InvoiceRedemptionResponse","description":"Invoice redemption information","default":{"id":"12345678-1234-5678-9abc-123456789abc","redemption_id":"12345678-1234-5678-9abc-123456789abc","invoice_item_id":"12345678-1234-5678-9abc-123456789abc","invoice_id":"12345678-1234-5678-9abc-123456789abc","redemption_type":0,"redemption_enrollment_id":"12345678-1234-5678-9abc-123456789abc","utc_redemption_date":"2015-12-25T19:25:24.731+00:00","utc_expiration_date":"2015-12-25T19:25:24.731+00:00","redemption_user_id":"12345678-1234-5678-9abc-123456789abc","redemption_user_last_name":"lname","redemption_user_first_name":"fname","redemption_user_login":"foo_login","redemption_user_email":"email@test.com","redemption_code":"ark-abcd1234","organization_id":"12345678-1234-5678-9abc-123456789abc","organization_name":"Test Organization","organization_short_name":"testorg","catalog_id":"12345678-1234-5678-9abc-123456789abc","catalog_name":"Sample name","catalog_description":"Sample description","catalog_pricing_model":2,"catalog_access_time_limit":"1.02:30:45","utc_catalog_creation_date":"2015-12-25T19:25:24.731+00:00","utc_catalog_modified_date":"2015-12-25T19:25:24.731+00:00","syllabus_id":"12345678-1234-5678-9abc-123456789abc","syllabus_title":"Sample title","syllabus_unique_name":"Sample name","syllabus_description":"Sample description","syllabus_certificate_id":"12345678-1234-5678-9abc-123456789abc","syllabus_credit_hours":3,"syllabus_section_number":"SN 101","syllabus_section_ceus":".2 CEUs","syllabus_section_duration":"2 hours","syllabus_section_objectives":"Sample objectives","utc_syllabus_creation_date":"2015-12-25T19:25:24.731+00:00","utc_syllabus_modified_date":"2015-12-25T19:25:24.731+00:00","api_error_entity":{"error_code":0,"warning_messages":[]}},"required":["redemption_id","invoice_item_id","invoice_id","organization_id","organization_name","organization_short_name","api_error_entity"],"type":"object","properties":{"redemption_id":{"format":"uuid","description":"Id of the invoice redemption","type":"string"},"invoice_item_id":{"format":"uuid","description":"Id of the invoice item this redemption corresponds to","type":"string"},"invoice_id":{"format":"uuid","description":"Id of the invoice this redemption corresponds to","type":"string"},"redemption_type":{"format":"int32","description":"Section=0;\r\nTrainingPlan=1;\r\nCatalog=2;\r\nUnknown=-1;0 = Section, 1 = TrainingPlan, 2 = Catalog, -1 = Unknown","enum":[0,1,2,-1],"type":"integer"},"redemption_enrollment_id":{"format":"uuid","description":"Id of the enrollment this redemption corresponds to","type":"string"},"utc_redemption_date":{"format":"date-time","description":"When this invoice redemption was redeemed","type":"string"},"utc_expiration_date":{"format":"date-time","description":"When this invoice redemption expires","type":"string"},"redemption_user_id":{"format":"uuid","description":"The id of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_last_name":{"description":"The last name of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_first_name":{"description":"The first name of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_login":{"description":"The login of the user that has redeemed this invoice redemption","type":"string"},"redemption_user_email":{"description":"The email address of the user that has redeemed this invoice redemption","type":"string"},"redemption_code":{"description":"The redemption code corresponding to this redemption","type":"string"},"organization_id":{"format":"uuid","description":"Id of the organization this redemption belongs to","type":"string"},"organization_name":{"description":"Name of the organization this redemption belongs to","type":"string"},"organization_short_name":{"description":"Short name of the organization this redemption belongs to","type":"string"},"catalog_id":{"format":"uuid","description":"Id of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_name":{"description":"Name of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_description":{"description":"Description of the catalog that the redemption belongs to. Will be null if the {Nexport.WebApi.Model.v1.InvoiceRedemptionResponse.RedemptionType} is not {Nexport.Models.PointOfSale.RedemptionTypeEnum.Catalog}","type":"string"},"catalog_pricing_model":{"format":"int32","description":"Pricing model of the catalog that the redemption belongs to\r\nNone=0;\r\nPerHourPrice=1;\r\nPerItemPrice=2;0 = None, 1 = PerHour, 2 = PerItem","enum":[0,1,2],"type":"integer"},"catalog_access_time_limit":{"description":"How long the catalog is available","type":"string"},"utc_catalog_creation_date":{"format":"date-time","description":"When the catalog was created","type":"string"},"utc_catalog_modified_date":{"format":"date-time","description":"When the catalog was last modified","type":"string"},"syllabus_id":{"format":"uuid","description":"Id of the syllabus that this redemption belongs to","type":"string"},"syllabus_title":{"description":"Title of the syllabus this redemption belongs to","type":"string"},"syllabus_unique_name":{"description":"Unique name of the syllabus this redemption belongs to","type":"string"},"syllabus_description":{"description":"Description of the syllabus this redemption belongs to","type":"string"},"syllabus_certificate_id":{"format":"uuid","description":"Id of the syllabus certificate","type":"string"},"syllabus_disable_certificates_for_student":{"description":"Whether or not syllabus certificates are disabled for the student","type":"boolean"},"syllabus_credit_hours":{"format":"","description":"Number of credit hours the syllabus is worth","type":"number"},"syllabus_section_number":{"description":"Section number of the syllabus this redemption belongs to","type":"string"},"syllabus_section_ceus":{"description":"Section CEUs of the syllabus this redemption belongs to","type":"string"},"syllabus_section_duration":{"description":"Section duration of the syllabus this redemption belongs to","type":"string"},"syllabus_section_objectives":{"description":"Section objectives of the syllabus this redemption belongs to","type":"string"},"utc_syllabus_creation_date":{"format":"date-time","description":"When the syllabus was created","type":"string"},"utc_syllabus_modified_date":{"format":"date-time","description":"When the syllabus was last modified","type":"string"},"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}},"ApiErrorEntity":{"description":"Model used to determine what, if anything, went wrong with an api request","required":["error_code"],"type":"object","properties":{"error_code":{"format":"int32","description":"Used to denote the kind of error that occurred, if any.\r\nNoError=0;\r\nUnknownError=1;\r\nValidationError=2;\r\nItemNotFound=3;\r\nAuthenticationError=4;\r\nAuthorizationError=5;0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found, 7 = Enrollment Already Exists, 8 = Subscription Already Exists","enum":[0,1,2,3,4,5,6,7,8],"type":"integer"},"error_message":{"description":"Message describing what caused the error to occur","type":"string"},"warning_messages":{"description":"Warning messages describing any  potential problems with the request that do not cause the request to fail","type":"array","items":{"type":"string"},"readOnly":true}}},"ApiResponseBase":{"title":"NexPort API Response","description":"Base class for api responses","default":{"api_error_entity":{"error_code":3,"error_message":"No entity found matching id in request","warning_messages":[]}},"required":["api_error_entity"],"type":"object","properties":{"api_error_entity":{"$ref":"#/components/schemas/ApiErrorEntity","description":"Error information"}}}}}}
```
