# Update Receipt Submissions

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/receipts/submissions/{submission_id}:
    put:
      summary: Update Receipt Submissions
      deprecated: false
      description: ''
      tags:
        - API Reference/Management API/Receipts
      parameters:
        - name: submission_id
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: '[Details](doc-341635)'
          required: true
          example: application/json
          schema:
            type: string
            default: application/json
            const: application/json
        - name: X-User-Agent
          in: header
          description: Arbitrary identifier of your client. [Details](doc-341635)
          required: true
          example: '{{X_USER_AGENT}}'
          schema:
            type: string
            default: '{{X_USER_AGENT}}'
        - name: X-Product-Name
          in: header
          description: API Product for API context. [Details](doc-341635)
          required: true
          example: '{{PRODUCT_NAME}}'
          schema:
            type: string
            default: '{{PRODUCT_NAME}}'
        - name: X-Loyalty-Club-Slug
          in: header
          description: LoyaltyClub for API context. [Details](doc-342138)
          required: false
          example: '{{LOYALTY_CLUB_SLUG}}'
          schema:
            type: string
            default: '{{LOYALTY_CLUB_SLUG}}'
        - name: Authorization
          in: header
          description: '[Member](doc-342129) or [User](doc-342130) Authorization.'
          required: false
          example: Bearer {{_OAUTH_TOKEN}}
          schema:
            type: string
            default: Bearer {{_OAUTH_TOKEN}}
        - name: X-Client-Authorization
          in: header
          description: '[Token](doc-342128) Authorization.'
          example: '{{API_TOKEN}}'
          schema:
            type: string
            default: '{{API_TOKEN}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                receipt_submission:
                  type: object
                  properties:
                    form: &ref_0
                      $ref: '#/components/schemas/Receipt%20Submission%20Form'
                    state:
                      type: string
                      enum:
                        - rejected
                        - accepted
                      x-apidog-enum:
                        - value: rejected
                          name: ''
                          description: ''
                        - value: accepted
                          name: ''
                          description: ''
                    rejection_reasons:
                      type: array
                      items:
                        $ref: '#/components/schemas/Error%20Message'
                    comment:
                      type: string
                  x-apidog-orders:
                    - form
                    - state
                    - rejection_reasons
                    - comment
                  x-apidog-ignore-properties: []
                suspected_duplicates:
                  type: array
                  items:
                    type: integer
                timestamp_version:
                  type: string
                  format: date-time
                  examples:
                    - '2022-11-15T16:25:58.099512Z'
                  description: >-
                    Time of the last record update. Used to ensure that you edit
                    recent data.
              x-apidog-refs: {}
              x-apidog-orders:
                - receipt_submission
                - suspected_duplicates
                - timestamp_version
              required:
                - receipt_submission
              x-apidog-ignore-properties: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                x-apidog-refs:
                  01JP9XHP4DXDKFJ62W37AVR4MS:
                    $ref: '#/components/schemas/Receipt%20Submission'
                    x-apidog-overrides: {}
                properties:
                  id:
                    type: integer
                  member_id:
                    type: integer
                  state:
                    type: string
                    enum:
                      - draft
                      - pending
                      - rejected
                      - accepted
                      - manual_verification
                    x-apidog-enum:
                      - value: draft
                        name: ''
                        description: ''
                      - value: pending
                        name: ''
                        description: ''
                      - value: rejected
                        name: ''
                        description: ''
                      - value: accepted
                        name: ''
                        description: ''
                      - value: manual_verification
                        name: ''
                        description: ''
                  error_messages:
                    type: array
                    items:
                      type: string
                    description: Errors encuntered during automatic OCR processing
                  rejection_reasons:
                    type: array
                    items:
                      type: string
                  manual_verification_reasons:
                    type: array
                    items:
                      type: string
                  suspected_duplicates:
                    type: array
                    items:
                      type: integer
                  file: &ref_1
                    $ref: '#/components/schemas/File'
                  form: *ref_0
                  prefilled_form: *ref_0
                  verified_by:
                    type: object
                    properties:
                      id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                    x-apidog-orders:
                      - id
                      - first_name
                      - last_name
                    x-apidog-ignore-properties: []
                  comment:
                    type: string
                  created_at: &ref_2
                    $ref: '#/components/schemas/date_time.created_at'
                  updated_at: &ref_3
                    $ref: '#/components/schemas/date_time.updated_at'
                x-apidog-orders:
                  - 01JP9XHP4DXDKFJ62W37AVR4MS
                x-apidog-ignore-properties:
                  - id
                  - member_id
                  - state
                  - error_messages
                  - rejection_reasons
                  - manual_verification_reasons
                  - suspected_duplicates
                  - file
                  - form
                  - prefilled_form
                  - verified_by
                  - comment
                  - created_at
                  - updated_at
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: API Reference/Management API/Receipts
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/346351/apis/api-3576995-run
components:
  schemas:
    Error Message:
      type: string
      enum:
        - excluded_store
        - other
        - image_unreadable
        - minimal_amount
        - not_older_than_x_days
        - fraudulent
      x-apidog-enum:
        - value: excluded_store
          name: ''
          description: when store is excluded from scanning
        - value: other
          name: ''
          description: when other error occur, one can left comment
        - value: image_unreadable
          name: ''
          description: when image is unreadable
        - value: minimal_amount
          name: ''
          description: when minimal amount is not meet
        - value: not_older_than_x_days
          name: ''
          description: when submission is older than x days
        - value: fraudulent
          name: ''
          description: ''
      x-apidog-folder: ''
    Receipt Submission Form:
      type: object
      properties:
        store_id:
          type: integer
          description: ID of store
        transaction_date:
          $ref: '#/components/schemas/date'
        total_amount:
          type: integer
          description: Amount on receipt as string
      x-apidog-orders:
        - store_id
        - transaction_date
        - total_amount
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    date:
      type: string
      format: date
      examples:
        - '2023-01-15'
      x-apidog-folder: ''
    date_time.updated_at:
      type: string
      description: Time of the last record update
      format: date-time
      examples:
        - '2022-11-15T16:25:58.099512Z'
      readOnly: true
      x-apidog-folder: ''
    date_time.created_at:
      type: string
      description: Time of record creation
      format: date-time
      examples:
        - '2022-11-05T16:25:58.099512Z'
      readOnly: true
      x-apidog-folder: ''
    File:
      type: object
      properties:
        url:
          type: string
          format: uri
          readOnly: true
          examples:
            - https://example.com/image.png
        identifier:
          type: string
          description: Only present when parent record has many files
          examples:
            - '1'
        mime_type:
          type: string
          examples:
            - image/jpeg
          readOnly: true
          description: Only present in certain circumstances
          nullable: true
        created_at:
          type: string
          format: date-time
          examples:
            - '2022-11-09T15:46:00.252860Z'
        updated_at:
          type: string
          format: date-time
          readOnly: true
          examples:
            - '2022-11-09T15:46:00.252860Z'
        image_details:
          type: object
          properties:
            width:
              type: integer
              minimum: 1
            height:
              type: integer
              minimum: 1
          x-apidog-orders:
            - width
            - height
          x-apidog-ignore-properties: []
          nullable: true
      x-apidog-orders:
        - url
        - identifier
        - mime_type
        - created_at
        - updated_at
        - image_details
      required:
        - url
        - created_at
        - updated_at
      readOnly: true
      x-apidog-ignore-properties: []
      nullable: true
      x-apidog-folder: ''
    Receipt Submission:
      type: object
      properties:
        id:
          type: integer
        member_id:
          type: integer
        state:
          type: string
          enum:
            - draft
            - pending
            - rejected
            - accepted
            - manual_verification
          x-apidog-enum:
            - value: draft
              name: ''
              description: ''
            - value: pending
              name: ''
              description: ''
            - value: rejected
              name: ''
              description: ''
            - value: accepted
              name: ''
              description: ''
            - value: manual_verification
              name: ''
              description: ''
        error_messages:
          type: array
          items:
            type: string
          description: Errors encuntered during automatic OCR processing
        rejection_reasons:
          type: array
          items:
            type: string
        manual_verification_reasons:
          type: array
          items:
            type: string
        suspected_duplicates:
          type: array
          items:
            type: integer
        file: *ref_1
        form: *ref_0
        prefilled_form: *ref_0
        verified_by:
          type: object
          properties:
            id:
              type: string
            first_name:
              type: string
            last_name:
              type: string
          x-apidog-orders:
            - id
            - first_name
            - last_name
          x-apidog-ignore-properties: []
        comment:
          type: string
        created_at: *ref_2
        updated_at: *ref_3
      x-apidog-orders:
        - id
        - member_id
        - state
        - error_messages
        - rejection_reasons
        - manual_verification_reasons
        - suspected_duplicates
        - file
        - form
        - prefilled_form
        - verified_by
        - comment
        - created_at
        - updated_at
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.mpc.dev.placewise.com
    description: Staging
security: []

```