Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Rules and Instructions:

  • JD Power should use these two endpoints created by PureSpectrum:

    • (API) Endpoints 1: YELLOW FLOW - Con-Can validate the Respondent with Pure-spectrumPureSpectrum:

      • This end point endpoint is used to Validate the PSID if it belongs to a supplier that agree agreed to work with a Modular survey - In case the PSID is valid, the end point endpoint returns a new Transaction ID (modular transaction)

      • JD Power needs to capture from the Buyer/Live URL these 3 parameters:

        • Survey ID: Survey identification → survey_id

        • Supplier ID: Supplier identification → supplier_id

        • Transaction ID: Transaction identification → transaction_id (core transaction)

        • NOTE: Make sure the 3 variable variables are enabled in Buyer settings

      • ENDPOINT SPECIFICATION HERE

        • Status
          colourRed
          titleLINK to ADDhttps://purespectrum.atlassian.net/wiki/spaces/PRODUCT/pages/edit-v2/2898493452#(API)-Endpoints-1%3A-Validate-the-Transaction-and-create-a-new-Transaction

    • (API) Endpoints 2: GREEN FLOW - When the respondent finalize finalizes the screener or the modular study, use this endpoint to register the respondent as Complete

      • ENDPOINT SPECIFICATION HERE

        • Status
          colourRed
          titleLINK to ADDhttps://purespectrum.atlassian.net/wiki/spaces/PRODUCT/pages/edit-v2/2898493452#(API)-Endpoints-2%3A-Register-the-Transaction-as-Complete

  • JD Power should redirect the Respondent to the PS redirect link /surveydone only at the end of the survey in on these 2 occasions:

    • Respondent is not qualified → Buyer terminated (18)

    • Respondent completed the study → Complete (21)

    • In both cases, JD Power has to redirect to the 1st Transaction ID (core transaction) received.

  • JD Power - Survey Creation in Marketplace:

    • Create a only one single survey and in on the Launch page on Marketplace activate the feature Modular Launch

    • In order to To check the transaction id ID that belongs to a "MODULAR Survey“, you can filter by this field name:

      • Status
        colourRed
        titleFIELDNAME to ADD

Schema:

...

Buyer Configuration:

  • Operator The operator should activate a configuration flag under Configuration Settings - Modular Survey

    • Status
      colourRed
      titleEXAMPLE to ADD

  • Buyer should activate the supplier ID in , survey ID, and transaction ID on the Buyer settings page.

    • Buyer Settings:

      Screenshot 2024-06-19 at 18.02.22.png

Supplier Configuration:

...

API ENDPOINT SPECIFICATION:

(API) Endpoints 1: Validate the Transaction and create a new Transaction

Use this API to validate the Respondent and in case of a valid transaction,

JDPA can should send us survey_id, supplier_id, and suppliertransaction_id (core transaction) in the API then we can use an existing API .

Code Block
POST {{BASE_URL}}/buyers/v2/surveys/SURVEY_ID/transactions?supplier_id=SUPPLIER_ID&transaction_id=TRANSACTION_ID

Body (Optional if data is sent via URL):

[]
Code Block
languagejson
{
    "supplier_id": 2,
    "transaction_id": "40AekOxWhKu8hffwcm7LC7"
}

Response (Transaction is valid for next study):

[]
Code Block
languagejson
{
    "transaction_id": "01vA34sCj8wffKBmelT6xT"
}

Response (Transaction is NOT valid for next study):

[]
Code Block
languagejson
{
    "ps_error_code": 1014,
    "ps_error_message": "Invalid 'transaction_id'."
}

Response (Supplier did NOT agree to Modular Survey):

Code Block
languagejson
{
    "ps_error_code": 1014,
    "ps_error_message": "The 'transaction_id' doesn’t belong to a supplier that agrees to Modular Survey."
}

(API) Endpoints 2: Register the Transaction as Complete

Use this API to validate the Respondent and in case of valid transaction, complete a transaction (modular transaction).

Code Block
POST {{BASE_URL}}/buyers/v2/surveys/SURVEY_ID/transactions/TRANSACTION_ID/status?st=21

Body:

[]
Code Block
languagejson

Response 200 OK:

[]
Code Block
languagejson

NOTE:

  1. Modular transactions created via API endpoint 1 can only be completed using API endpoint 2.

  2. Any core transaction received initially in the buyer URL should be completed/rejected using /surveyDone endpoint.