Skip to main content

Set how the customer became aware of mittwald

PUT/v2/customers/{customerId}/referral-source
API version
v2
Request method
PUT
Operation ID
customer-set-customer-referral-source

Request​

  • customerIdstringrequired
    Example:"f6bb2d44-e6be-46dc-96f7-9602a7177a75"

Responses​

Format
application/json
Description
    Content-Type: application/json

    {}
    {
    "type": "object"
    }

    Usage examples​

    $ curl \
    --fail \
    --location \
    -X PUT \
    -d '{"referralSource":"string"}' \
    -H "Authorization: Bearer $MITTWALD_API_TOKEN" \
    -H 'Content-Type: application/json' \
    https://api.mittwald.de/v2/customers/string/referral-source
    import { MittwaldAPIV2Client } from "@mittwald/api-client";
    import { assertStatus } from "@mittwald/api-client-commons";

    const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
    const response = await client.customer.setCustomerReferralSource({
    "customerId": "string",
    "data": {
    "referralSource": "string"
    }
    });

    assertStatus(response, 200);

    use \Mittwald\ApiClient\Generated\V2\Clients\Customer\SetCustomerReferralSource\SetCustomerReferralSourceRequest;
    use \Mittwald\ApiClient\Generated\V2\Clients\Customer\SetCustomerReferralSource\SetCustomerReferralSourceRequestBody;

    $client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

    // TODO: Please consult the properties and constructor signature of
    // SetCustomerReferralSourceRequestBody to learn how to construct a valid instance
    $body = new SetCustomerReferralSourceRequestBody(/* TODO: ... */);

    $request = (new SetCustomerReferralSourceRequest(
    customerId: "string",
    body: $body
    ));
    $response = $client->customer()->setCustomerReferralSource($request);

    var_dump($response->getBody();

    On this page