post-management-instances.rst (3593B)
1 .. http:post:: /management/instances 2 3 This request will be used to create a new merchant instance in the backend. 4 It is only available for the implicit ``admin`` instance. 5 6 **Required permission:** ``instances-write`` 7 8 **Request:** 9 10 The request must be a `InstanceConfigurationMessage`. 11 12 **Response:** 13 14 :http:statuscode:`202 Accepted`: 15 2FA is required for this operation, usually to validate the 16 email and/or phone numbers registered for the instance. 17 This returns the `ChallengeResponse`. @since **v21** 18 :http:statuscode:`204 No content`: 19 The backend has successfully created the instance. 20 :http:statuscode:`409 Conflict`: 21 This instance already exists, but with other configuration options. 22 Use "PATCH" to update an instance configuration. Alternatively, 23 the currency provided in the configuration does not match the 24 currency supported by this backend. Another possible conflict 25 would be if a deleted but not purged instance is known under this 26 ID to the backend. 27 28 **Details:** 29 30 .. ts:def:: InstanceConfigurationMessage 31 32 interface InstanceConfigurationMessage { 33 34 // Name of the merchant instance to create (will become $INSTANCE). 35 // Must match the regex ``^[A-Za-z0-9][A-Za-z0-9_.@-]+$``. 36 id: string; 37 38 // Merchant name corresponding to this instance. 39 name: string; 40 41 // Merchant email for customer contact and password reset. 42 email?: string; 43 44 // Merchant phone number for password reset (2-FA) 45 // @since **v21**. 46 phone_number?: string; 47 48 // Merchant public website. 49 website?: string; 50 51 // Merchant logo. 52 logo?: ImageDataUrl; 53 54 // Authentication settings for this instance 55 auth: InstanceAuthConfigurationMessage; 56 57 // The merchant's physical address (to be put into contracts). 58 address: Location; 59 60 // The jurisdiction under which the merchant conducts its business 61 // (to be put into contracts). 62 jurisdiction: Location; 63 64 // Use STEFAN curves to determine default fees? 65 // If false, no fees are allowed by default. 66 // Can always be overridden by the frontend on a per-order basis. 67 use_stefan: boolean; 68 69 // If the frontend does NOT specify a payment deadline, how long should 70 // offers we make be valid by default? 71 // Optional @since **v22** (before the setting was mandatory). 72 // If not provided, the global merchant default will be used. 73 default_pay_delay?: RelativeTime; 74 75 // If the frontend does NOT specify a refund deadline, how long should 76 // refunds be allowed by default? Added on top of the 77 // payment deadline. 78 // @since **v22** 79 default_refund_delay?: RelativeTime; 80 81 // If the frontend does NOT specify an execution date, how long should 82 // we tell the exchange to wait to aggregate transactions before 83 // executing the wire transfer? This delay is added on top of 84 // the refund deadline and afterwards subject to rounding 85 // via the ``default_wire_transfer_rounding_interval``. 86 // Optional @since **v22** (before the setting was mandatory). 87 // If not provided, the global merchant default will be used. 88 default_wire_transfer_delay?: RelativeTime; 89 90 // How far should the wire deadline (if computed with the help of 91 // the ``default_wire_transfer_delay``) be rounded up to compute 92 // the ultimate wire deadline? 93 // @since **v22**, defaults to no rounding if not given. 94 default_wire_transfer_rounding_interval?: RoundingInterval; 95 }