post-instances.rst (1992B)
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:`400 Bad Request`: 33 The request body is malformed or a required field is missing. 34 Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` or 35 ``TALER_EC_GENERIC_PARAMETER_MISSING``. 36 :http:statuscode:`403 Forbidden`: 37 Self-provisioning is not enabled. 38 Returned with ``TALER_EC_MERCHANT_GENERIC_UNAUTHORIZED``. 39 :http:statuscode:`409 Conflict`: 40 This instance already exists, but with other configuration options. 41 Use "PATCH" to update an instance configuration. Alternatively, 42 the currency provided in the configuration does not match the 43 currency supported by this backend. Another possible conflict 44 would be if a deleted but not purged instance is known under this 45 ID to the backend. 46 :http:statuscode:`500 Internal Server Error`: 47 The server experienced an internal failure. 48 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``.