Javascript
import SnagSolutions from '@snagsolutions/sdk'; const client = new SnagSolutions({ apiKey: 'My API Key', }); const response = await client.referral.createCode({ loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780' }); console.log(response.id);
{ "id": "<string>", "websiteId": "<string>", "organizationId": "<string>", "referralCode": "<string>", "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "deletedAt": "2023-11-07T05:31:56Z", "userId": "<string>" }
This endpoint allows you to create a referral code
Body
"558bcf56-24f1-4ef4-9787-043086295780"
200
Was this page helpful?