taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

post-instances.rst (1494B)


      1 .. http:post:: /instances
      2 
      3   This request will be used to create a new merchant instance in the backend.
      4   Since protocol **v21**.
      5 
      6   Only available if self-provisioning is enabled.
      7 
      8   **Required permission:** none
      9 
     10   **Request:**
     11 
     12   The request must be a `InstanceConfigurationMessage`.
     13 
     14   :query token_validity_ms=DURATION: *Optional*.
     15     Pass a non-zero DURATION in milliseconds to get a
     16     refreshable login token for the SPA with the
     17     given validity duration in the response.  @since **v21**.
     18 
     19   **Response:**
     20 
     21   :http:statuscode:`200 Ok`:
     22     The backend has successfully created the instance. Body will
     23     be an `LoginTokenSuccessResponse` with a refreshable
     24     login token for the SPA as requested. @since **v21**.
     25   :http:statuscode:`202 Accepted`:
     26     2FA is required for this operation, usually to validate the
     27     email and/or phone numbers provided for the instance.
     28     This returns the `ChallengeResponse`. @since **v21**
     29   :http:statuscode:`204 No Content`:
     30     The backend has successfully created the instance. No login
     31     token was requested, so nothing is returned.
     32   :http:statuscode:`409 Conflict`:
     33     This instance already exists, but with other configuration options.
     34     Use "PATCH" to update an instance configuration. Alternatively,
     35     the currency provided in the configuration does not match the
     36     currency supported by this backend. Another possible conflict
     37     would be if a deleted but not purged instance is known under this
     38     ID to the backend.