Skip to content

Get the approvals on an approval's order

Open .md

GET/v1/api/store/{team_slug}/approvals/{hash_id}

v1Operation ID v1_public_approvals_show

Looks up the approval, then returns every approval on the same order or quote, as a list: job and order approvals, completed or not. Find the one you asked for by id.

Each item has the approval's notes, status and signature, and who completed it: approved_by is contact, with approved_by_contact_id, when a Customer Portal contact did. Job approvals also have items (each mockup or design with its own status and the customer's notes) and mockup (the images).

Permission

Any member of the team.

Path parameters

  • team_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team
  • hash_idstringrequired

    The approval's id, from the approvals list. A hash id; unique keys and document numbers are refused with 404.

    • Example Fi0zPeMlwKadEo

Request body

This operation takes no request body.

Response

200Successful response.

  • dataarray of objectsrequired
    Fields of each item (26)
    • contact when a Customer Portal contact completed it (approved_by_contact_id). user when a team member completed it. Otherwise customer, even before anyone has approved it.

      • One of: "contact", "user", "customer"
    • The contact who completed it in the Customer Portal, when YoPrint knows which contact it was. Null otherwise.

    • approved_by_userstring | null

      The hash id of the team member who completed it on the customer's behalf, if any.

    • completedboolean

      True once the customer finished, whether they approved or asked for changes.

    • completed_atstring (date-time) | null
    • created_atstring (date-time)
    • The last contact known to have opened it in the Customer Portal. Null when none is known.

    • customer_last_viewed_datestring (date-time) | null
    • idstring
    • itemsarray of objects

      Job approvals: each mockup file or design, in order, with its own status and notes. media items also carry the file's details and expiring links; mockup_design items carry the design's revision and page previews. An empty list for order approvals.

      Fields of each item (9)
      • idstring

        The item's id.

      • media_idstring | null

        media items: the file's id.

      • mockup_design_idstring | null

        mockup_design items: the design's id.

      • namestring | null
      • notes_from_customerstring | null
      • notes_to_customerstring | null
      • positioninteger
      • statusstring
        • One of: "pending-approval", "approved", "need-changes"
      • typestring

        media: an uploaded mockup file. mockup_design: a design made in the mockup designer.

        • One of: "media", "mockup_design"
    • job_idstring | null

      Job approvals only.

    • job_namestring

      An empty string for order approvals.

    • The job number, such as JOB-1001. An empty string for order approvals.

    • mockuparray of objects | null

      Job approvals: the uploaded mockup files only (designs are only in items); an empty list when there are none. Null for order approvals.

      Fields of each item (11)
    • notes_from_customerstring | null
    • notes_to_customerstring | null
    • order_external_typestring | null
    • order_idstring | null
    • order_object_typestring | null

      sales_order or quote.

      • One of: "sales_order", "quote"
    • True when the approval is on a quote.

    • The order or quote number.

    • request_bystring | null

      A team member's hash id, or null. Approvals created in the web app or through the API are null here: neither records who requested them.

    • signaturestring | null

      The customer's signature, when they signed.

    • signed_terms_textstring | null

      The terms the customer agreed to when signing.

    • statusstring

      pending: not sent yet. sent-to-customer: emailed. viewed-by-customer: the customer opened it. need-changes: the customer finished and asked for changes ("Review requested"). completed: approved.

      • One of: "pending", "sent-to-customer", "viewed-by-customer", "need-changes", "completed"
    • typestring

      job: artwork approval for one job's mockups. order: approval of the whole order.

      • One of: "job", "order"
  • statusintegerrequired
  • successbooleanrequired

Errors

  • 401The API key is missing or wrong (unauthenticated).

  • 403You are not allowed to do this. api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only {"message": "Insufficient Permission"}. Other refusals use the error envelope, with unauthorized or user_is_not_authorized.

  • 404Not found. page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. code: null, with a message that starts "No query results for": there is no record with that id.

    When
    No approval of this team has this id, or its order came from Shopify.
    Fix
    Use an id from the approvals list.

Notes

  • Unlike the list, this includes approvals on draft orders.